What does member initialization list do? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What does member initialization list do?

i am confused with the constant member variables.how does it differ from normal declaration?

4th Jan 2017, 5:29 AM
Shubhamitra Datta
Shubhamitra Datta - avatar
1 Answer
+ 1
a normal variable can be assigned a value and can be changed later during the execution of the program. but in case of const variable, we cannot change the value once it is initialized.
6th Jan 2017, 2:26 PM
fathima shabana