Possible to have virtual constructor

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rameshgcecs
    New Member
    • Feb 2008
    • 1

    Possible to have virtual constructor

    Why It Is Not Possible To Have A Virtual Constructor In C++?
  • Peterwkc
    New Member
    • Apr 2007
    • 55

    #2
    The purpose of constructor is explicit initialize a raw memory to a valid value.

    That's why u can't have virtual destructor.

    Comment

    • sicarie
      Recognized Expert Specialist
      • Nov 2006
      • 4677

      #3
      As this is an extremely common homework problem, let me ask you: why do you think it is not possible?

      2nd question: If it were possible, would it be useful?

      Comment

      Working...