+ 1
What is the use of constant objects?
5 Respuestas
+ 5
It is covered in the lesson, in case you forget ...
https://www.sololearn.com/learn/CPlusPlus/1895/
+ 2
I think it is used when we need to have an object that is read only, being set as const object, the code will raise an exception when some code try to modify the said object's attribute. It makes it easier to add protection against unplanned/accidental attempt of modifying the said object's attribute.
I could be wrong, but that's what I understood from the lesson's description.
+ 2
No problem buddy 👌
+ 1
Thats fine. But the use of const object is not given .... Like why it is practically used Ipang
+ 1
Thanks for explaining Ipang