View Single Post
Old 08-17-2002, 02:02 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,505
sde is on a distinguished road
your problem is in the prototype of the GetAge function. you need to add " () " to the end of it:

Code:
class Cat // Declaration of the class Cat 
{ 
public: 
int GetAge(); // accessor function 
void SetAge (int Age); // accessor function 
void Meow(); // general function 
private: // begin private section 
int itsAge; // member variable 
};
this is the same scripts that introduced me to classes in c++ .. gotta love sams teaching us c++ in 21 days ..
sde is offline   Reply With Quote