Im trying to create a bank account. In the bank account the user creates an account and puts whatever amount they want to open account. after account is created they can go to withdraw or deposit and add or subtract additional monty from the account. Im trying to use a method for the deposits but I keep getting an error"error C2064: term does not evaluate to a function taking 1 arguments" and Im not sure exactly what the problem is. I know the deposit has to be added to the balance and the balance needs to be updated but I cant even get to that point. Im using Visual Studio 2010 Window forms application,here is the code I'm entering.
Your problem is line 9 (in your snippet). The expression
doesn't make sense. You can only use this notation when constructing a double. So, for example, you could do
double FindDepBal( BalDep ); // Construct with value
FindDepBal = BalDep; // Assign new value
The way you currently have it, the compiler is trying to treat FinalDepBal as a function (which it things might take one argument, BalDep), which is what the error is about. Google the error code and find this page.