나는 C의 간단한 코드가 있습니다내 .c 코딩을 GCC에서 컴파일 할 수없는 이유는 무엇입니까?
#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
누구든지 나를 도울 수 있습니까?
을 \ 위해/N을 변경하고 싶습니다. – birryree
그 따옴표, 일반 인용 있습니까? –
귀하의 파일이 UTF-8을 사용하고, '\ 342', '\ 200', '\ 234'는 U + 201C LEFT DOUBLE QUOTATION의 UTF-8 인코딩 인 16 진수 0xE2, 0x80, 0x9C로 매핑됩니다 MARK :'\ 235 '로 끝나는 시퀀스는 U + 201D 오른쪽 이중 따옴표입니다. C로 코딩 할 때''를이 기호로 매핑해야한다고 생각하는 워드 프로세서를 사용하지 마십시오. 너를 괴롭힐거야. –