3

私は c に簡単なコードを持っています:

#include <stdio.h>

main()
{
   printf(“Hello, world! /n”);
}

しかし、GCCでコンパイルできません。コンパイルしようとしたときの警告:

 1. gcc hello.c -o hello
 2. hello.c: In function 'main:
 3. hello.c:4:1: error: stray '\342' in program
 4. hello.c:4:1: error: stray '\200' in program
 5. hello.c:4:1: error: stray '\234' in program
 6. hello.c:4:11: error: 'Hello' undeclared (first use in this function)
 7. hello.c:4:11: note: each undeclared identifier is reported only once for each function
    it appears in
 8. hello.c:4:18: error: 'world' undeclared (first use in this function)
 9. hello.c:4:23: error: expected ')' before '!' token
 10. hello.c:4:23: error: stray '\342' in program
 11. hello.c:4:23: error: stray '\200' in program
 12. hello.c:4:23: error: stray '\235' in program

誰でも私を助けてくれますか?

4

2 に答える 2

13
于 2012-04-16T04:19:38.800 に答える
4

You probably also want to change /n to \n

于 2012-04-16T04:22:48.253 に答える