Virtual constructor, C/C++ Programming

Is it possible to have Virtual Constructor? If yes, how? If not, Why not possible?

Posted Date: 2/12/2013 6:21:23 AM | Location : United States





There is nothing like Virtual Constructor. The Constructor can''t be virtual as the constructor is a code which is responsible for creating an instance of a class and it can''t be delegated to any other object by virtual keyword means.

Posted by Robert | Posted Date: 2/12/2013 6:21:58 AM


Related Discussions:- Virtual constructor, Assignment Help, Ask Question on Virtual constructor, Get Answer, Expert's Help, Virtual constructor Discussions

Write discussion on Virtual constructor
Your posts are moderated
Related Questions
Implement a Algorithm to verify if the link list is in Ascending order? A: template bool linklist::isAscending() const{ nodeptr ptr = head; while (ptr->_next)


Program is to find the area of room: Program is to find the area of room with default values using classes & object class room   {   private:     int len;     i

# include stdio.h> # include string.h> # include conio.h> void main() {           int i=0,j=0,b=0,count=0;           int a[100];           for(i=0;i

Ask questioGiven an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. I

Operation on list - c++ program: Write a program in c to Insert value on list and list iteration. typedef struct item *node_ptr; struct item {                   int e

Write a program that writes your name on the monitor ten times. Write this program three times, once with each looping method.



basic salary of employees & calculate net salary in C++ Programming