The Dink Network

Reply to Re: i could use some help

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:
 
 
May 29th 2008, 04:15 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Yes, you are right, Someone:

DinkC knows that if there are not any curly braces after an if statement that it will only apply to the next statement.

However, there is one critical error. This does not work for anything involving variables.

void talk(void)
{ int &temp = 0; // This will not work!! if (&life == &lifemax) &temp = 1;
}

To properly assign variables in if statements, you must use the curly braces.

void talk(void)
{ int &temp = 0; // This works fine. if (&life == &lifemax) { &temp = 1; }
}