-
December 10th, 2008, 11:57 AM
#1
abstract class
A class with a pure virtual function will be an abstract class.
1. we cannot have constructor for abstract class because we cannot instantiate an abstract class;
2. can we have non pure virtual methods inside an abstract class?
3. can we have member variables inside an abstract class which can be initialized by its subclass? if yes, how to initialize them?
If C++ abstract class is the same as Java Interface, no member variables are allowed, only constants and abstract methods are allowed.
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
|