| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can anyone help me with this c++ program, I can't run it.
#include<iostream.h> #include<stdlib.h> #include<string.h> //the list of function prototypes void Deposit(); void Withdraw(); void Query(); void Show(); void Exit(); char Menu(); //++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++ char main() { char[] choice = Menu(); while(choice !="E") { switch(choice) { case "D" : Deposit(); break; case "W" : Withdraw(); break; case "Q" : Query (); break; case "S" : Show(); break; case "E" : Exit (); break; default:cout<<"INVALID ACCOUNT NUMBER ENTERED, PLEASE TRY AGAIN!!!.."; } choice = Menu(); // This call the menu } // end of while loop return 0; } //This is the end of the main program //++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++ char Menu() { char choice; system ("cls"); //this will clear the screen do{ cout<<"\tWelcome to Superbank International \n"; cout<<"===================================="; cout<<"\n D Deposit \n "; cout<<"\n W Withdraw \n"; cout<<"\n Q Query \n"; cout<<"\n S Show all \n"; cout<<"\n E Exit \n"; cout<<"\n\n Option: "; cin>>choice; } while (choice != "E"); return choice; } //+++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++ |
|
#2
|
||||
|
||||
|
please use the [ code] tags when posting code with indentations....
what *exactily* is the problem? Will it compile? Is it terminating awkwardly? or what.... |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Code help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|