17) Const Objects¶
They’re regular Objects except the values become read-only after initialization. It also only works on
const member functions. Just google more about them if you need to know, this is an extremely niche use case of Classes. Usually it’s easier and more readable to just use const data members instead. It’s very rare to run into a situation where both a non-const and const version of a Class is required. But it’s there, if you need it.Yeah no there’s not much else to say about them it’s just read-only versions of Classes. I can’t even think of any examples for them existing. The concept exists, you can use it, but it’s not really a big deal.