Hello,

I know this may sound a little bit "newbie-ish" but please bear with me. I've just started out to learn C++, and I have run into a road block trying to declare my own class. I keep getting errors when i go to compile my program. When i am defining the class, and what methods it will use, it won't let me then define those class methods later on......uhh, let me try a little example to explain.


class Cat
{
public:
//constructors
Cat(int age);
~Cat();

//accessors
int GetAge() const {return itsAge;}
void SetAge(int newAge) {itsAge=newAge;}

void Meow();

private:
int itsAge;
}

//now define class methods

Cat::Cat(int age)
{
itsAge=age;
};

Cat::~Cat() {};

void Cat::Meow()
{
cout >> "Meow" << endl;
};


Ok, so when i go to compile this, i get errors where i try and define my class methods. It seems to be having hard time figuring between my declaration and definitions? im not sure.

Anyone else have similar problems when learning?