PDA

View Full Version : Whats with all the voids????


Jon on Toast
01-05-2008, 09:46 AM
Whats with all the voids in a class??

e.g

Class Blah
{
public:
Blah;
virtual ~Blah;

void............;
void............;

private:

Blah; <<<<<<< No void?????
Blah;
};

#endif

I newbie soo don't be scared of sounding patronising....

SamuraiCrow
01-05-2008, 09:49 AM
"void" means that there is no return code for a particular method. It is used to implement what used to be called a "procedure" in Pascal and BASIC.

In the private part you are declaring variables rather than methods so you don't need to worry about return codes.

Jon on Toast
01-05-2008, 12:04 PM
Thank you.