how does the compiler interpret const keyword and how it can be fooled.
Anonymous
It depends (if the variable is initially const, there might be compiler optimizations which cannot be fooled, i.e. the compiler is allowed to use the value directly in that case). But the general answer to this is const_cast. And I would add, very bad and dangerous practice (the data might be stored in read-only memory segment as well).
Check out your Company Bowl for anonymous work chats.