abstract class

S

sank

hello all,

i am a c++ programmar. i want to know other methodes of making
abstract other than pure virtual class.
thank u all.
 
D

Dave

If by "abstract" you mean uninstantiateable as a most-derived class, I
suppose you could try making all of the constructors protected. Then, the
class could not be instantiated directly, but a derived object could stll
construct the base subobject...

But I feel this answer is inadequate since I don't really get the gist of
what you're trying to do... Anyway, hope it helps!
 
D

Dave

Dave said:
If by "abstract" you mean uninstantiateable as a most-derived class, I
suppose you could try making all of the constructors protected. Then, the
class could not be instantiated directly, but a derived object could stll
construct the base subobject...

But I feel this answer is inadequate since I don't really get the gist of
what you're trying to do... Anyway, hope it helps!

*** Please disregard my earlier unintentional top-post; apologies... ***

If by "abstract" you mean uninstantiateable as a most-derived class, I
suppose you could try making all of the constructors protected. Then, the
class could not be instantiated directly, but a derived object could stll
construct the base subobject...

But I feel this answer is inadequate since I don't really get the gist of
what you're trying to do... Anyway, hope it helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,883
Members
47,414
Latest member
djangoframe

Latest Threads

Top