During a recent code review it was pointed out to me that it is bad to use #define for string literals because :

while making your debug build your compiler makes a separate copy of the string for each use, in your exe, while in your release build it ptimizes this to make just one string

Now if you are passing your string to a function as an argument and that function modifies it, you
are safe in your debug build becoz each usage is a new string however, in your release build you
are dead cause the subsequent uses of that string points to modified/corrupt data

I have therefore been advised to use a global array of const char*s.

Any opinions/alternative solutions will be welcome

Thanx

sanjay