![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| call constructor of java class in script | thebladerunner | Shell Programming and Scripting | 1 | 10-21-2008 12:23 PM |
| Linguistic Tree Constructor 2.8.0 (Default branch) | iBot | Software Releases - RSS News | 0 | 01-27-2008 07:30 PM |
| how do you handle a constructor and destructor that fail | amitpansuria | High Level Programming | 4 | 08-16-2007 02:16 PM |
| what is diff b/w copy constructor and overloaded assignment operator | amitpansuria | High Level Programming | 3 | 08-06-2007 12:45 PM |
| Constructor problem | woot4moo | UNIX for Dummies Questions & Answers | 4 | 09-05-2006 10:49 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
why constructor cannot be virtual
helo i read many books but i cant find the proper answer that why
constructor cannot be virtual can u explain me in simple term that why constructor cannot be virtual Regards, Amit |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Because some properties of a virtual function does not apply to constructor such as "run time binding", besides why would you want a virtual constructor ???
|
|
#3
|
|||
|
|||
|
Quote:
Solutions to this include using factory objects, which is exactly what COM does with IClassFactory so the call to CreateInstance is virtual. Similarly IBM's SOMClass::somNew. |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|