← BYTES
C++·Starter·Ref: 8.1.15
What is a default constructor in C++?
Have a question about this video? Mention reference 8.1.15 when you contact us.
a.A constructor that takes exactly one argument
b.A constructor that can be called with no arguments, either explicitly written or implicitly generated by the compiler when no other constructor is user-declared
c.The destructor of a class
d.A constructor that always throws an exception
A default constructor lets you create an object with no explicit initialization arguments, e.g. `MyClass obj;` -- the compiler automatically generates one if the class declares no constructors at all, but stops doing so the moment any other constructor is explicitly defined.
Find this on YouTube & Instagram
Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:
#BYTES#BYTES8115#C