Thread: help

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    267
    add braces for each case label

    Code:
    switch(...)
    {
        case 1:
        {
            //your code here
            break;
        }
    }

    OS: Windows 7, XUbuntu 11.10, Arch Linux
    IDE: CodeBlocks
    Compiler: GCC

  2. #2
    Registered User
    Join Date
    Sep 2007
    Posts
    29
    Quote Originally Posted by h_howee View Post
    add braces for each case label

    Code:
    switch(...)
    {
        case 1:
        {
            //your code here
            break;
        }
    }
    you dont need them.

Popular pages Recent additions subscribe to a feed