What does member initialization list do? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Resposta
+ 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