Could someone show me what is the code sequence to accept user input at the keyboard. I know how to get the text. I need to know how to replace the line **account1.debit( 25.0 )** with the actual user input number that is in --- ** getline(cin, input)**
The function in place works well for embedded data. I just want to use the number from the keyboard input and not embedded data.
Thanks in advance
Code:
int main()
{
string input;
cout << "Account1 balance is $50,00 << endl;
cout << "Enter an amount to withdraw from Account 1: ";
getline(cin, input);
cout << "Attempting to debit $25.00 from account1." << endl;
account1.debit( 25.0 );
}