cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Not-so-nested If statements
Not-so-nested If statements
Feb 10, 2012 at 11:15am UTC
ToniAz
(351)
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 UTC
Feb 10, 2012 at 11:17am UTC
coder777
(8442)
Yes, it is
Feb 10, 2012 at 12:50pm UTC
onur
(128)
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 UTC
MrHutch
(1822)
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.