0
Can someone give me an example where you would use constant objects rather than normal ones?
2 Respuestas
+ 2
I have never seen constant objects yet, but for constant variables, this post has a great explanation http://www.cplusplus.com/forum/beginner/65076/
You could use a constant object in a similar way. Though no examples where you would want all of an object's properties unchangeable comes to mind.
+ 2
I believe enumerators would be a good example: they are a set of fixed values linked to their string rappresentation.. in other words.. constants!