How do I check the input data type of a variable in C++?
- by atinesh singh
i'm atinesh currently started learning c++ but i've one doubt about how to check the data type of input variable in c++.
#include<iostream.h>
void 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
}