int a; if(cin >> a) { cout << "是数字"; } cout << a;判断是否输入类型正确,用if即可
输入检查
猜你喜欢
转载自blog.csdn.net/sinat_36391009/article/details/60870696
今日推荐
周排行