
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
In article <[EMAIL PROTECTED]>, Matthias Hofmann
<[EMAIL PROTECTED]> writes
>The string "Hello World" is of type const char*, so you are assigning to a
>constant char. For the sake of compatibility with C, C++ allows the
>assignment of the const char* to a char*. However, you should use the
>following code instead:
Not really, it provides a special (and deprecated conversion) for string
literals to char*, this conversion is not permitted except in very
special contexts and certainly does not generalise as a conversion from
char const * to char*
--
Francis Glassborow ACCU
If you are not using up-to-date virus protection you should not be reading
this. Viruses do not just hurt the infected but the whole community.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
| <-- __Chronological__ --> | <-- __Thread__ --> |