linux下stray ‘\342’ in program等错误处理方法

linux下stray ‘\342’ in program等错误处理方法

linux下stray ‘\342’ in program等错误处理方法

在linux下使用c编译,出现如下错误时
mingxi@ubuntu:~/opeartion$ gcc client.c
client.c: In function ‘client’:
client.c:13:1: error: stray ‘\342’ in program
printf(“client sent\n”);
^
client.c:13:1: error: stray ‘\200’ in program
client.c:13:1: error: stray ‘\234’ in program
client.c:13:18: error: expected ‘)’ before ‘sent’
printf(“client sent\n”);
^
client.c:13:18: error: stray ‘\’ in program
client.c:13:18: error: stray ‘\342’ in program
client.c:13:18: error: stray ‘\200’ in program
client.c:13:18: error: stray ‘\235’ in program
是因为在源代码中有中文符号,如上 printf(“client sent\n”); 的引号为中文,改成英文即可。

你可能感兴趣的:(错误集锦,linux,linux错误)