No, that was a typo posting. The * was not in my program. I REM'ed it out to test that it would compile without those statements to isolate my problem. I had also made it a const as you had pointed out. But it still didn't compile, untill I used <iostream.h> instead of just plain <iostream> and...
Thank You all... that was it foada. I did and it compiled fine. This has been driving me crazy.
(The * was a result of a careless /* not really in my program).
Each time I try to add overloaded input/output I get a compiler message about accessing the class's private data. If I REM out the statments it functions as expected.
My Friend statment is:
friend ostream& operator << (ostream &out, Meal &aMeal);
With Meal being the Class, aMeal is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.