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
Write a program called plus that will display asterisks in the shape of a plus sign which has the height and width specified by the user. You must only allow entry of an odd numb

Program is to define a class as student: Program is to define a class as student and display the records specific depending upon the number class student  {  private:

If quicksort is so quick, why bother with anything else? If bubble sort is so bad, why even mention it? For that matter, why are there so many sorting algorithms? Your mission (sho

Sine function computation


Given 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. If the given

Write a Program that illustrate Command Line Parameters? main(int argc, char *argv[]) { int i; for(i = 0; i printf("arg %d: %s\n", i, argv[i]); return 0; }

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

Program is to check whether the string entered is a palindrome or not: Program is to check whether the string entered is a palindrome or not invoke function from main int p

Explain The Type Conversion in Expressions in c language? When variables and constants of different types are used in an expression they are all converted to same type. The com