Why should we make some functions and variable as const inside a class?
Const functions and variables inside class
In this video, https://online.codingblocks.com/app/player/75258/content/97832/527/lecture, Prateek Bhaiya said that its a good practice to make some variables and function inside the class as const. Why is it so?
@tanyaa.sood you cannot change their values once they are declared so there is no chance of accidentally overwriting them. This is why it is a good practice.