![]() Related Questions Virtual destructors: If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching Latest Answer : Virtual constructor is not build-in C++ feature but it doesn't mean its not used by devs in code and in conversations. There are many other things that doesn't exist in particular language yet, people find ways around to solve it (SingleTon, Virtual Constructor, ... Latest Answer : A constructor of a class is mainly responsibly for turning the raw memory allotted to an object into a usable object. DEFAULT CONSTRUCTOR:The default constructor is a constructor that takes no argument. Part::Part()String() and String(const char* str) ... Latest Answer : Inspite of repeated requests by some (few) sensible people to everybody to read the question properly before responding, nobody listens.For doreen, the question does not ask you to explain deep copy and shallow copy mechanism neither does is asks how ... No Latest Answer : yes in c++ a class can have a default constructor.a default constructor is a constructor which doesn't pass any arguements to it. ... Read Answers (6) | Asked by : Nisar.E Latest Answer : Copy constructor is 1. a constructor function with the same name as the class 2. used to make deep copy of objects. There are 3 important places where a copy constructor is called. 1. When an object is created from another object of the same type 2. When ... Latest Answer : Constructor is called when an object is created.Copy constructor is called when the copy of an object is made. For e.g. passing parameter to function by value, function returning by value. Copy constructor takes the parameter as const reference to the ... Latest Answer : Thank you everybody for giving the right answer to the question. However the use of the term "pointer" in the question still leaves a lingering doubt in my mind as to whether the questioner really typoed a reference as a pointer? or did ... Tags : Pointer What happens to the member pointers when an exception occures in constructor, while allocating memory ? how can we over come this ? Read Answers (2) | Asked by : Shyam Latest Answer : Virsa's questions, why constuctors cannot be private and the difference between... are not related to the original question at all, and I simply don't understand why people even take the pain of answering a separate question in the context of "how to ... Read Answers (9) | Asked by : Test 1.why constructor can't be virtual?2.what's the difference between destuctor and virtual destructor? 1.why constructor can't be virtual?2.what's the difference between destuctor and virtual destructor?
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||