Interview Questions  

Go Back   Interview Questions > Interview Questions & Answers > Information Technology > Programming Languages > Cpp

Cpp C++ Interview Questions, Learn by sharing C++ Interview Questions asked in various Companies, Get Career advices, Interview Procedures from C++ experts, Post asked C++ Interview Questions and Answers.

   

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-10-2008, 06:04 AM
Senior Member
 
Join Date: Feb 2008
Posts: 1,210
Default Can we have Virtual Constructors

Can we have Virtual Constructors?
Reply With Quote
  #2 (permalink)  
Old 04-30-2008, 06:22 AM
Junior Member
 
Join Date: Apr 2008
Posts: 3
Default

Quote:
Originally Posted by Margaret View Post
Can we have Virtual Constructors?
Virtual Constructors are meaningless.When we create an object,constructor of that class is invoked.If we have virtual constructor,we may not know the type of the object to be created,So cant create object.
So constructors can't be virtual.
Reply With Quote
Reply

Tags
c++, programming language, software

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On