[Advanced]There is a fairly substantial difference between functions and class methods in C++. This is because a method is a function with an implicit extra parameter: a pointer to the object. So, in a way this:
class Dog{ unsigned int age; unsigned int weight;public: int getAge(); int getWeight(); // etc...};int Dog::getAge(){ return age;}int Dog::getWeight(){ return weight;}
Can, in a way, be interpreted as this:
struct Dog{ unsigned int age; unsigned int weight;};int Dog__getAge(Dog * dog){ return dog->age;}int Dog__getWeight(Dog * dog){ return dog->weight;}
In fact, a lot of plain C code will end up emulating that type of behavior. You'll have a struct and a set of functions designed to operate on that struct. The most noticeable difference between regular functions and member functions is most apparent when dealing with function pointers which you can read about here:
http://www.newty.de/fpt/index.html
vs. pointers to member functions which you can read about here:
http://www.parashift.com/c++-faq-lite/pointers-to-members.html
[/Advanced]
Hope this is all correct and helps!