I'm having a problem with these functions...
...I get 4 errorsCode:#include <iomanip.h> #include <stdlib.h> Dep(float Bal, float Amount) { Bal=Bal+Amount; return 0;} Check(float Bal, float Amount) { Bal=Bal-Amount; return 0;} Charge(float Bal, float Amount) { Bal=Bal-Amount; return 0;} Withdraw(float Bal, float Amount) { Bal=Bal-Amount; return 0;} main() { float Bal, Amount; char Comm; cout<<"\n BALANCING CHECKBOOK PROGRAM "; cout<<"\n --------------------------- "; cout<<"\n\n Christian Aziz' Account "; cout<<"\n Enter Starting Balance : "; cin>>Bal; cout<<"\n Command Options: " <<"\n d- deposit" <<"\n c- check " <<"\n s- service charge " <<"\n w- withdrawal " <<"\n x- exit "<<endl; cout<<"\n Enter command: "; cin>>Comm; cout<<"\n Enter amount in dollars and cents: "; cin>>Amount; while(Comm) { if(Comm == 'd') {Dep(Bal, Amount);} else if(Comm == 'c') {Check(Bal,Amount);} else if(Comm == 's') {Charge(Bal,Amount);} else if(Comm == 'w') {Withdraw(Bal,Amount);} else if(Comm == 'x') {cout<<"\n Your New Balance is: $"<<Bal; break;} else {continue;} cout<<"\n Enter another command: "; cin>>Comm; cout<<"\n Enter amount in dollars and cents: "; cin>>Amount; } system("PAUSE"); return 0; }
ANSI C++ forbids declaration 'Dep' with no type
ANSI C++ forbids declaration 'Check' with no type
ANSI C++ forbids declaration 'Charge' with no type
ANSI C++ forbids declaration 'Withdrawal' with no type
What am I doing wrong??



LinkBack URL
About LinkBacks


