I get 2 errors when I try to compile my program, the errors happen in my implementation file: error C4716: 'DatingInfo::setMaleSex' : must return a value. And error C4716: 'DatingInfo::setFemaleSex' : must return a value
I've tried different things to return a value but I just can't get it. Any help is greatly appreciated.
char DatingInfo::setMaleSex(char M)
sexM = M;
char DatingInfo::setFemaleSex(char F)
sexF = F;
This won't work. You told the compiler you were going to return a char, but you didn't return anything. That is what it is complaining about. However, a setX method generally doesn't return anything. Maybe you should change the return type to void, and make sure you do the same thing to those declarations in the header file.