Why does the following code, when run, give an access violation? I've looked at it with the debugger, and leading into the strcpy instruction everything looks as it should...
Code:int main(void) { char *strarray[3] = {"one", "two", "three"}; cout << strarray[0]; //Prints "one" as it should... strcpy(strarray[0], "new"); //Access violation? return(0); }