Answers for "how to call switch function in main c++"

193

c++ switch

switch(expression) {
  case x:
    // code block
    break;
  case y:
    // code block
    break;
  default:
    // code block
}
Posted by: Guest on February-21-2020
2

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;
}
Posted by: Guest on September-29-2021

Code answers related to "how to call switch function in main c++"

Code answers related to "Javascript"

Browse Popular Code Answers by Language