It really shouldn't work.
Constants are generally not stored anywhere. They are expanded inline.
It's possible that your compiler is being nice to you and giving you a memory location to modify, but normally that's impossible.
What warnings are you getting? I imagine you must get some...