-1
私はgnu-linuxオペレーティングシステムでcファイルをコンパイルしようとしていますが、これらのコードをコンパイルしようとするとコンパイラにエラーが発生します。なぜCプログラムで迷子になった '342'エラー?
マイop.cファイルは、次のとおりです。私はこのコードをコンパイルしようと
#include <stdio.h>
int main(int argc, char *argv[]){
int i;
for (i=0; i < argc; i++){
printf(“command line argument [%d] = %s \n”, i, argv[i]);
}
return 0;
}
、私はこれらのエラーを取得しています。どうすれば修正できますか?
op.c: In function ‘main’:
op.c:6:3: error: stray ‘\342’ in program
printf(“command line argument [%d] = %s \n”, i, argv[i]);
^
op.c:6:3: error: stray ‘\200’ in program
op.c:6:3: error: stray ‘\234’ in program
op.c:6:13: error: ‘command’ undeclared (first use in this function)
printf(“command line argument [%d] = %s \n”, i, argv[i]);
^
op.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
op.c:6:21: error: expected ‘)’ before ‘line’
printf(“command line argument [%d] = %s \n”, i, argv[i]);
^
op.c:6:21: error: stray ‘\’ in program
op.c:6:21: error: stray ‘\342’ in program
op.c:6:21: error: stray ‘\200’ in program
op.c:6:21: error: stray ‘\235’ in program
ありがとうございます。
あなたがソースファイルに "スマート" 引用符を使用することはできません。 –
コンパイラのエラーで最初に行うことは、スタックオーバーフローに遭遇して尋ねるのではなく、正確なエラーをGoogle検索に入力して最初のリンクを開くことです。 –
これらのエラーは、ソースコード内の拡張されたASCII文字から来ていますが、これは構文では許可されていません。 –