dimanche 22 mars 2020

How can I evaluate the data type of a value in C++?

Is there a function in C ++ to evaluate whether or not the data type of a variable is a number? I try to get a value from user and evaluate it whether or not it is a number. I was doing some google searching and came across a library called cctype. I found a function called isdigit(). When I pass a number to that function, it returns false. However, I also want to evaluate whether it is an integer or not. Because a float can also be a number.

Aucun commentaire:

Enregistrer un commentaire