Originally posted by Perspective
>the OS will likely raise an ?>exception.

you mean only windows will raise an exception. accessing values from a pointer using array positions works fine under every other operating system ive used (linux, unix, solaris, bsd), just not windows.

>Besides, using a char pointer in this manner is bad form for C++

this is not true, the sentance should read.....

"Besides, using a char pointer in this manner is bad form for windows"

codemonkey, its not you. its windows. although accessing memory this way can be dangerous, it is alowed in other OS'
im not sure how to get around it in windows other than to do as suggested before and just use a char array instead of pointer.
No, it's not just windows. You're VERY confused.
String literals can be placed into real-only memory on any implementation. Attempting to write to read only memory will result in undefined behavior.