Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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
9+1 =