Is there any way to check if the input to a string is in the range of 00 to 99?
I am creating a class for money and because float isnt recommended i thought of getting the input into two strings. One for euros and one for cents. After this, combining the strings and streaming them out to an int Long. But the problem is, if the user uses too few or to many digits in cents, than the whole thing will become a disaster
void Money::deposit() {
cout << "How much do you want to deposit? (Euros [ENTER], Cents [ENTER)" << endl;
string euros, cents;
cout << "Deposit: " << flush; cin >> euros; cout << "," << flush; cin >> cents;
}