Looking for a little help with enum. Here's the code:
No matter where I put the decleratiron "compensation comp;", in the constructor for example, or the input function, it's not recognized across both input and the print function.
Well that did the trick. But I did not think it was possible to initialize inside the private member area of the class. Is "compensation comp" not a sort of initialization?
It looks like the compiler cannot find the compensation enumeration you're trying to base comp on. For this to work, the enumeration, compenstion, must be declared before declaring comp. For instance:
Well that did the trick. But I did not think it was possible to initialize inside the private member area of the class. Is "compensation comp" not a sort of initialization?
It's not any different than what you're doing on line 31.