Well, my question is pretty basic.
I started programming in C++ back in 2005 for a programming class, but we never covered a lot of it. So a few months ago I started reading articles on this site. I'm trying to compile a game I've been working on, and as good as I am with graphics, my programming skills are not par. I've been learnign C++ in sections, but I don't really understand the whole "void" vs. "int" for functions and things. An example of code would be:
Code:
class Animal
{
public:
Animal();
~Animal();
void eat();
void sleep();
void drink();
private:
int legs;
int arms;
int age;
};
//The class Animal contains information and functions
//related to all animals (at least, all animals this lesson uses)
class Cat : public Animal
{
public:
int fur_color;
void purr();
void fish();
void markTerritory();
};
//each of the above operations is unique
//to your friendly furry friends
//(or enemies, as the case may be)