Jump to content


Whats with all the voids????


2 replies to this topic

#1 Jon on Toast

    New Member

  • Members
  • Pip
  • 4 posts

Posted 05 January 2008 - 05:46 PM

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....

#2 SamuraiCrow

    Senior Member

  • Members
  • PipPipPipPip
  • 459 posts

Posted 05 January 2008 - 05:49 PM

"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.

#3 Jon on Toast

    New Member

  • Members
  • Pip
  • 4 posts

Posted 05 January 2008 - 08:04 PM

Thank you.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users