Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Is the structure of this empty if statement correct?

C++
If (Statement 1)
{
    (Return 1)
}
else
{
    If (Statement 2)
    {
        (Return 2)
    }
    else
    {
        If (Statement 3)
        {
            (Return 3)
        }
        else
        {
            If (Statement 4)
            {
                (Return 4)
            }
            else
                // from JSOP - possibly a statement could go here
        }
        If (Statement 5)
        {
            (Return 5)
        }
        else
            // from JSOP - possibly a statement could go here

    // from JSOP - definitely a missing closing brace here
}       
Posted
Updated 5-Aug-11 11:57am
v3

1 solution

No. Look at it now that its been formatted so you can actually read it.
 
Share this answer
 
v3
Comments
Sergey Alexandrovich Kryukov 6-Aug-11 2:25am    
Idiotic votes gets more and more irritating. What, would I ask, so wrong in this solution? Trivial, so what; was there a choice? Why voting 1. John spend time to edit the original code, actually fixed it, explained the bugs... I voted 5. Honestly, answering trivial questions makes no sense, only wastes time...
--SA
#realJSOP 6-Aug-11 13:07pm    
Amazing. The voting here is pretty unpredictable...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900