So I tried making some sort of Bank system fetauring: Showing balance, Depositing money, Withdrawing money and Exiting. everything went well so far, I made a function for all these options but when I try to start the programm, I just get the message that there are too many arguments in the function, I tried everything but nothing seemed to help. (btw this is not homeworks I just don't know what tag I could use).
here is the relevant part of the code if you need to see more code to help me tell me and I will send it:
switch(option){
case 1:
showBalance(Balance);
break;
case 2:
Depo(Deposit, Balance);
break;
case 3:
Draw(Withdraw, Balance);
break;
case 4:
Exit();
break;
default:
std::cout << "Not a valid input! ";
}
return 0;
}
void showBalance(double Balance){
std::cout << "your balance is " << Balance << '\n';
}
double Depo(double Balance, double Deposit){
Balance = Balance + Deposit;
std::cout << "Thanks for Depositing, you deposited " << Deposit << " And your new Balance is " << Balance << '\n';
return 0;
}
double Draw(double Balance, double Withdraw){
Balance = Balance - Withdraw;
std::cout << "Thanks for Withdrawing, you Withdrawed " << Withdraw << " And your new Balance is " << Balance << '\n';
return 0;
}
void Exit(){
std::cout << "Thanks for visiting us! ";
}