I'm writing a program to gain info and then print it. Problem is when a person enter $1231 for my account the $ crashes it.
I would like to use cin.peek to check if it is there if it is delete it
so far i have
cout << "Balance : ";
cin >> file.balance;
if(file.balance < 0)
{
cout << "Please Enter postivie numerical value for balance: ";
cin >> file.balance;
}
if(cin.peek() == '$')
{
// get one character
cin.ignore('$')
}
//read the number