我對如何檢查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