|
-
August 21st, 2012, 11:15 AM
#5
Re: Error C2079: uses undefined class
 Originally Posted by VictorN
AS STLDude already pointed out you should use forward declarations in the header files rather than #ncludes.
And #ncludes should be mostly used in the .cpp files.
Besides, this passing Waiter object by value looks bad:Better would be to pass it by cont reference:
Code:
class Table{
public:
void assignWaiterToTable(const Waiter &waiter);
string myWaiter();
thanks for the reply. While trying to troubleshoot the problem, I stripped each class to the bare minimum functions and variables, removed all pointers and references, to hopefully figure out the cause of the problem
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|