The compiler knows when you try to read and when you try to write to a struct member, and only writing is disallowed when it is const.