|
-
May 8th, 2001, 11:50 AM
#1
Thread Starter
Junior Member
Inheritance in C++ (urgent)
I have a Class Account with some functions like
withdraw , deposit, Print as public functions
and I have also classes called Checking , Savings which are inherited from the above ones . I have overided the print function of Class Account in both Checking and Savings classes.
But my below code does not work properly.
Account *A[10];
A[1] = new Checking();
A[2] = new Savings();
When I reference A[1]->print() sometimes it is giving some error or just printing from Account but not coming from Checking or savings
Can Any one Help me
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|