pls explain initialisation through initialisation list and normal way inside constructor body
thanks
Initialisation list
hi @vatsal50,
In a very simple terms , what happens is initialisation list allows you to initialise data members of the class, in constrast to assigning in the body , so its a very powerfull tool that allows us to use reference and const type variables as they can only be initialized not assigned .
refer this for detailed explaination :-
https://www.learncpp.com/cpp-tutorial/85-constructors/
This is a very nice post on initialization in constructor , i highly recommend you to read 8.5, 8.5a, 8.5b
In case of any doubt feel free to ask