我对如何检查C++中输入变量的数据类型有疑问。如何在C++中检查变量的输入数据类型?
#include<iostream>
using namespace std;
int main()
{
double a,b;
cout<<"Enter two double values";
cin>>a>>b;
if() //if condition false then
cout<<"data entered is not of double type";
//I'm having trouble for identifying whether data
//is double or not how to check please help me
}
(编号的点,现在固定的,因为他们从实际问题分心) – MSalters 2010-04-19 14:34:54