How to have both the default and custom constructors?
Summary To have both a default and custom constructor in C++, you need to understand how constructor initialization lists and aggregate initialization work. The key takeaway is that when you define a custom constructor, the compiler no longer generates a default constructor for you, which is used for aggregate initialization. Root Cause The root cause … Read more