char* s1 = new char[30];
char s2[] = "is not";
const char* s3 = "likes";
s3 = "allows";
strcpy( s2, s3 );
sprintf( s1, "%s %s %s using functions.", "C++", s2, "fast code" );
printf( "String was : %s\n", s1 );
delete[] s1;
I was confused at the
const char* s3 = "likes";
s3 = "allows";
Because I think s3 is a const, so it cannot alter. However, when s3 = "allows"
it works. Why?