float deposit (float balance)
{
float amount[3];
system("cls");
cout<<"Enter the amount you wish to deposit"<<endl;
cin>>amount[3];
balance = balance + amount[3];
writeBalance(balance);
return balance;
}
//This is a function to allow the user to increase their balance
但是当我在程序的存款部分输入金额时,会出现一个弹出框并显示:
Run-Time Check Failure #2 - Stack around the variable 'amount' was corrupted.
任何帮助都会非常感谢