Hello,
i am hoping to get some help with the following code and the errors that i am getting. i have never written on here before and i am very new to C++. i have a feeling that i am just missing something simple. i have been staring at the screen for too long. Can someone please help me out. thank you in advance
Error C2039 'Benefit': is not a member of 'Employee' =line 313
Error C2228 left of '.setHealthInsurance' must have class/struct/union =line 313
Error C2039 'Benefit': is not a member of 'Employee' =line 314
Error C2228 left of '.setLifeInsurance' must have class/struct/union =line 314
Error C2039 'Benefit': is not a member of 'Employee' =line 315
Error C2228 left of '.setVacation' must have class/struct/union=line 315
Error C2374 'employee': redefinition; multiple initialization =line 318
Error C2664 'Employee::Employee(Employee &&)': cannot convert argument 3 from 'std::string' to 'char' =line 318
PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.com/articles/z13hAqkS/
Hint: You can edit your post, highlight your code and press the <> formatting button.
You can use the preview button at the bottom to see how it looks.
Your code appears to be missing some parts. I do not see main and the first 14 lines would be better found in main not at the beginning of your code.
No where do I see where or how "Benefit" is defined which makes it hard to understand how you are using it.
The line benefit = Benefit(hinsurance, linsurance, vaca); does not make any sense. It looks like "Benefit" is a class that is being constructed the wrong way. And even if it was don the right way you do not set it equal to a variable this way.
Your topic says "Inheritance", but your code shows no attempt at inheritance.
Try posting the whole code so all can see what you have done and smeone ight be ale to figure out what is wrong.
As it is there is not enough to compile and even if I tried it would be full of errors.