Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

c++ switch

switch(a) {
  case -1:
    std::cout << "a == -1" << std::endl;
  break;

  case 0:
    std::cout << "a == 0" << std::endl;
  break;

  default:
    std::cout << "a is something else" << std::endl;
}
 
PREVIOUS NEXT
Tagged: #switch
ADD COMMENT
Topic
Name
5+6 =