Not-so-nested If statements

Hello everyone!

Is this possible in C++:


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


Thanks!
Last edited on
Yes, it is
ok course the closing brace on line 7 closes the starting brace on line 5.

So the if statements are indeed nested!
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.