Identifier 'deposit' cannot have a type qualifier

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KasimDelovan
    New Member
    • Jun 2012
    • 2

    Identifier 'deposit' cannot have a type qualifier

    I have got this error: I get the error:
    Identifier 'deposit' cannot have a type qualifier

    I have defined this class
    class BankAccount {
    private:
    double balance;
    double interest;
    int custNr;

    public:
    BankAccount(dou ble bala, int cusNr, double inter);//constructor
    int getCustNr();
    bool withDraw (double AmountWithD);
    void deposit (double addToBalance);
    double calculateIntere st();
    void saveToFile();
    void readFromFile();
    };

    and here is deceleration of "deposit" function
    void BankAccount::de posit(double addToBalance)
    {
    balance = balance + addToBalance;
    }
    when I compile the program I get the error:
    Identifier 'deposit' cannot have a type qualifier

    any help,
    thank
    Kasim
  • KasimDelovan
    New Member
    • Jun 2012
    • 2

    #2
    Ok, I found out the reason. There's no closing parenthesis for a function before deposit.

    Kasim

    Comment

    Working...