Weekly Exercise 2 — Issues

So,  I have successfully commented out anything to do with manager and compiled it successfully.  I have tried to include the Manager class as well and was unsuccsesful.  I am getting caught up at this point. 

Manager.cpp: In member function ‘void Manager::getWorkerHours(Employee*)’:
Manager.cpp:11:38: error: request for member ‘getID’ in ‘emp’, which is of non-class type ‘Employee*’
Manager.cpp:11:71: error: request for member ‘getHours’ in ‘emp’, which is of non-class type ‘Employee*’
Manager.cpp:12:35: error: request for member ‘getName’ in ‘emp’, which is of non-class type ‘Employee*’
Manager.cpp:13:23: error: request for member ‘getHours’ in ‘emp’, which is of non-class type ‘Employee*’

So I figured the problem was maybe it was a pointer and that was the error, but once again I am still stuck.  here is the output.

Manager.cpp: In member function ‘void Manager::getWorkerHours(Employee)’:
Manager.cpp:9:6: error: ‘emp’ has incomplete type
Manager.h:1:7: error: forward declaration of ‘struct Employee’

I am wondering do I make it so its inherited or two separate classes?

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment