- #1
ermines
- 45
- 0
Hello guys. I'm trying to do the command "PLEASE PRESS ENTER KEY TO RETURN TO MAIN MENU."
The problem is that I don't know how to catch this enter key. I do know that its ascii value is 13. I tried using sscanf and getch but can't seem to make it work.
void StockBroker::showAllBalances()
{
char choice[80];
int i;
sscanf(choice, "%d", &i );
StockHolder holder;
cout << endl;
holder.showBalance();
cout << endl;
cout << "PRESS ENTER KEY TO RETURN TO MAIN MENU..." << endl;
cin >> choice;
}
of cource, this program is under another program named broker.showAllBalances().
So anyone who could help me?
The problem is that I don't know how to catch this enter key. I do know that its ascii value is 13. I tried using sscanf and getch but can't seem to make it work.
void StockBroker::showAllBalances()
{
char choice[80];
int i;
sscanf(choice, "%d", &i );
StockHolder holder;
cout << endl;
holder.showBalance();
cout << endl;
cout << "PRESS ENTER KEY TO RETURN TO MAIN MENU..." << endl;
cin >> choice;
}
of cource, this program is under another program named broker.showAllBalances().
So anyone who could help me?