Hello, im still learning classes. But im just not sure of something.
Let's say i make a new file called Dog.cpp and another one called Dog.h
In the Dog.h i create the class, and in the Dog.cpp i set the functions.
Isn't it supposed to link itself? Do i like need to include Dog.h into Dog.cpp?
And another question about classes.
How come this code give me an error, and please, could you help me improve it so i will be better at classes next time. Thank you.Code:class Dog { public: Dog(string Color, int hisAge); ~Dog(); string getColor(); int getAge(); private: int age; }; void Dog::Dog(string Color, int hisAge) { hisAge = age; } void Dog::~Dog() { } int getAge() { return age; } string getColor() { return Color; }