Search code examples
c++default-constructor

Can we have a body for the default constructor in C++?


Can we have a body for the default constructor in C++?

Thanks.


Solution

  • Yes, of course you can. Any constructor that doesn't require an argument is a default constructor.