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
Why many companies are switching their current business language to PHP? Where PHP basically used? PHP is rapidly gaining popularity and numerous companies are switching their

Project Description: Seeking a Voting Bot Script / Program Skills required are ASP, Javascript, C Programming, PHP, Software Architecture

A: If you employ auto_ptr objects you would not need to be concerned along with heap objects not being deleted even if the exception is thrown.

Write a C++ program that reads from keyboard 3 integers, with proper input prompt, and then displays the maximum sum of any pair of numbers from these three. If the 3 numbers are 5

Command-line arguments are passed into programs using the arguments of main(). Here's a quick example, for a program called by typing "progname file.txt 1 2.7": #include #incl

Write an algorithm to print all even numbers in descending order and draw the flowchart.

A: It allows a program to reference an identifier in global scope which has been hidden by another identifier along with the same name in the local scope.

Write a C program to input your full forename and full surname. e.g James McCarren and display in one string your complete initial and surname i.e J McCarren . Your initial should

how yo use the friend function?

Make the following 3 functions work by filling in appropriate C code. This file 1. // Write a function to count the number of particular characters in a string. // Do not use a