Dear Friends
I am reading an int and a double from file.
How can I check whetheer the value read is an int or double.
int intval;
double doubleval;
ifstream infile("Data.dat")
infile >> intval >> doubleval;
// how can I check whether intval has got an integer and doubleval has got a double value.
//infile.dat has
2 23.323
what happens if infile.dat has data like this
# &&*********
//so it'll read junk values so how could I check the variables.??
Please help me to overcome this problem!!!
Bookmarks