Non-Static Data Members Initialization in C++11

Here, you’ll see how to add default values for data members with a new C++11 feature.

Handling default values

You can initialize data members in various constructors, delegate them to reuse code, and inherit from base classes. Yet, we can still improve at assigning default values for data members!

See below:

Get hands-on with 1400+ tech skills courses.