Inheritance

This is a discussion on Inheritance within the C++ Programming forums, part of the General Programming Boards category; I am creating a program that is using a base class account and two derived classes sav_acct and chk_acct. I ...

Inheritance

I am creating a program that is using a base class account and two derived classes sav_acct and chk_acct. I also have a derived class using sav_acct as a base called time_acct.
The problem I am having is an error when I try to compile stating 'type name expected' directed toward this statement in my main program: p=new chk_acct( arguments for account).
I have declared p as follows: account *p;.
If anybody could give me some help, it would be greatly appreciated.

chk_acct base

All of the classes are seperate header files.
Such as account.h, sav_acct.h, chk_acct.h, and time_acct.h.
The account class is the parent class and the others are derived classes of account. I have included the header file in the main program if that was what you were asking. I'm not sure if the ifndef statements are completely correct or are working right. Any suggestions?