Démonstration :
Et si je mets const :Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 Project : Forums Compiler : GNU GCC Compiler (called directly) Directory : C:\dev\forums\ -------------------------------------------------------------------------------- Switching to target: default Compiling: main.c main.c: In function `main': main.c:28: warning: initialization discards qualifiers from pointer target type main.c: At top level: main.c:26: warning: unused parameter 'argc' main.c:26: warning: unused parameter 'argv' Linking console executable: console.exe Process terminated with status 0 (0 minutes, 3 seconds) 0 errors, 3 warnings
Code:char const *chaine = "Coucou tout le monde";
Savoir configurer son compilateur fait gagner des bits...Code:
1
2
3
4
5
6 <...> Compiling: main.c main.c: In function `main': main.c:29: warning: passing arg 1 of `STR_DelBlanks' discards qualifiers from pointer target type <...>