warning C4700: 使用了未初始化的局部变量"a"
#include<iostream>#include<string>usingnamespacestd;intmain(){inta;switch(a){case1:{c...
#include<iostream>
#include<string>
using namespace std;
int main()
{
int a;
switch (a)
{
case 1:
{
cout << "x is 1";
break;
}
case 2:
{
cout << "x is 2";
break;
}
default:
cout << "value of x unknown";
}
return 0;
}
warning C4700: 使用了未初始化的局部变量“a” 展开
#include<string>
using namespace std;
int main()
{
int a;
switch (a)
{
case 1:
{
cout << "x is 1";
break;
}
case 2:
{
cout << "x is 2";
break;
}
default:
cout << "value of x unknown";
}
return 0;
}
warning C4700: 使用了未初始化的局部变量“a” 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询