Dec 7, 2012 at 11:18pm

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.

    if (tabControl1->SelectedTab == tabPage2)

            double depamount;
            double BalDep;
            double FindDepBal;
            BalDep = (bal - depamount);
            Double::TryParse(txtDeposit->Text, depamount);
            lblBal->Text = FindDepBal.ToString();

            txtDeposit->Text = BalDep.ToString();

"error C2064: term does not evaluate to a function taking 1 arguments"

This error is telling me that you are either sending in too little variables or too many variables into that function/method.

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.