Why does it say "Memory access violation"?
char* str = "HelloGuys";
int len = strlen(str);
for (int i=0; i<(len/2); ++i){
char t = str[len-i-1];
str[len-i-1] = str[i]; //error
str[i] = t;
}
See Question&Answers more detail:os