The Dink Network

Reply to Re: void( void )

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
April 24th 2005, 06:48 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
In programming, you'd do a void if you want to run a part of code that doesn't have a return of a value at the end. Like:

void addOne(int a)
{
a += 1;
}

void because there's no return a; (which DinkC doesn't even have) at the end and (int a) because this function has a parameter and it's an integer. You can have returns in a void but then it doesn't return a value.

The second (void) means the function has no parameters which is the case in DinkC. Ie: void doSomething() is the same as void doSomething(void). That basically explains why it says (void).. but since there's nothing you can do to add parameters, it's just there because it should be there, not because there's much need, in DinkC anyway.