C++<p>Assume you have a class Foo, and this:<p>const Foo fooInst(1, 2, 3);<p>if you try to call a method foo.bar() you can&#x27;t, unless that method bar() is also marked const with this type of signature:<p>int bar() const;<p>Meaning that bar returns an int, but can&#x27;t assign to any fields or call any other non-const methods.<p>Although, it does have this hideous const_cast&lt;&gt; operator that anyone can use to break these rules.