📜  c++ awitch 语句 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:54.289000             🧑  作者: Mango

代码示例1
var = 1

switch (var):

  case 1:
    break; // Code that is executed if var is 1

  case 2:
    break; // Code that is executed if var is 2

  default:
    break; // Code that is executed if no cases match