I have the following code:
int main()
{
char *input = "why isn't this possible?";
input[0] = 'W';
return 0;
}
I want to modify the first value of the string, but it appears to cause an access violation on the input[0] = 'W';
line.
Any ideas why this is happening. Oddly I don't recall this error happening on my old machine running Visual Studio, but happens with GCC and Pellas C.