Hello all:
I am trying to write an if/else statement using a bool expression. But there is a problem. It seems like NEITHER the if or the else is being evaluated. Am I making a silly mistake? Any advice would be appreciated.
start = false;
if( start = false )
{
// Do this
// int result = 2;
}
else
{
// Do that
// int result = 4;
}
The error is:
result was not declared in this scope
What am I doing wrong? Thanks.
I am trying to write an if/else statement using a bool expression. But there is a problem. It seems like NEITHER the if or the else is being evaluated. Am I making a silly mistake? Any advice would be appreciated.
start = false;
if( start = false )
{
// Do this
// int result = 2;
}
else
{
// Do that
// int result = 4;
}
The error is:
result was not declared in this scope
What am I doing wrong? Thanks.