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
I would recommend using this option:
#include
.getch()
in a character variable (Will not be displayed on screen).'\r'
('\r\n'
normally), break out of the loop.