How can I restrict the user to input real numbers only in C++ program?
Example:
double number; cin >> number;
and it won\'t accept t
You can retrieve your data as a std::string then use one of the standard string conversion function to see if the content matches your expectations.
std::string