switch case结构中,case后面不能声明初始化的变量,比如 case true: string str; //错误,隐式初始化 int a = 0; //错误,显式初始化 int b; //正确,没有初始化 如果想声明初始化的变量,需用{}将其包含起来