Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When initializing non-static data members of built-in / intrinsic / primitive types, should I use the “initialization list” or assignment?

0
10 Posted

When initializing non-static data members of built-in / intrinsic / primitive types, should I use the “initialization list” or assignment?

0
10

For symmetry, it is usually best to initialize all non-static data members in the constructor’s “initialization list,” even those that are of a built-in / intrinsic / primitive type. The FAQ shows you why and how.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123