Relative Content

Tag Archive for c++constructordefault-constructorcreateobjectparameterized-constructor

Why we can use other constructors in c++ when we put a ()

I am a student and when I was working on classes, I noticed that in c++ when we don’t define a constructor, the compiler automatically considers the default constructor for the class, but when we define a constructor, the default constructor is no longer defined. And when we don’t have a default constructor, we can’t create an object without arguments.