Not-so-nested If statements

Feb 10, 2012 at 11:15am
Hello everyone!

Is this possible in C++:


1
2
3
4
5
6
7
8
9
 if ()
{
             ...
             if ()
             {
             ...
}
 ...
}


Thanks!
Last edited on Feb 10, 2012 at 11:16am
Feb 10, 2012 at 11:17am
Yes, it is
Feb 10, 2012 at 12:50pm
ok course the closing brace on line 7 closes the starting brace on line 5.

So the if statements are indeed nested!
Feb 10, 2012 at 1:30pm
One of the first things a compiler will do is get rid of any whitespace. Whitespace is there to make things more readable for humans and not much else.
Topic archived. No new replies allowed.