Liste des Groupes | Revenir à cl c |
Richard Harnden <richard.nospam@gmail.invalid> writes:
[...]
>Is there any reason not to always write ...>
>
static const char *s = "hello, world";
>
... ?
>
You get all the warnings for free that way.
The "static", if this is at block scope, specifies that the
pointer object, not the array object, has static storage duration.
If it's at file scope it specifies that the name "s" is not
visible to other translation units. Either way, use it if that's
what you want, don't use it if it isn't.
>
There's no good reason not to use "const". [...]
Les messages affichés proviennent d'usenet.