Why must class members declared as const be initialized in the constructor initializer list rather than in the constructor body?
const
What is the difference
Because constant variables and references must be initialized at time of declaration i.e before use. But Constructors will assign value to a varaible not initailize the variable therefore you must use initailizier list for constant and references