can not declare ac variable to be abstract type 'Account'

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
class User
{ protected:
    char password[30];
    char username[20];
    string type;
    int deposit;
    public:
        virtual void mainmenu()=0;
};

class Customer : public virtual User{};
class Account : public virtual User
{
protected:
        int acno;
        char name[30];
        char type;
        int deposit;
    public:
    void create_Account();	

class Staff:public Customer,public Account
{};

void Staff::write_Account()
{
    Title();
	Account ac;
	ofstream outFile;
	outFile.open("Account.txt",ios::app);
	ac.create_Account();
	outFile.write(reinterpret_cast<char *> (&ac), sizeof(Account));
    outFile.close();

}
Last edited on
You have to implement the function Account::mainmenu().
Topic archived. No new replies allowed.