int a;
cin>>a;
if(cin.good())
{
//输入正确
}
else
{
//输入错误;
}
【拾遗】检测cin输入是否满足类型
猜你喜欢
转载自blog.csdn.net/shihoongbo/article/details/49779309
今日推荐
周排行