Is it mandatory to use constructor in a class C++?

Answer: C++ Empty constructor necessity depends upon class design requirements . We know that C++ class constructor is called when we create an object of a class. If a class is not required to initialize its data member or does not contain data member, there is no need to write empty constructor explicitly.10 Eki 2016

Sizin İçin Seçtik  What sounds do bees make to communicate?

Leave a Reply

Your email address will not be published. Required fields are marked *