Why can't I change individual characters in a character pointer?

Is there any way around this?

1
2
  char * c = "Hellop";
  c[5]=' ';
1
2
3
4
char c[] = "Hellop" ;
c[5] = ' ' ;
std::string s = "Hellop" ;
s[5] = ' ' ;
Topic archived. No new replies allowed.