Reply to Re: i could use some help
If you don't have an account, just leave the password field blank.
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; }
}
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; }
}