error: stray ‘\×××’ in program

写了个简单的函数,编译竟然报错“main.c:9:38: error: stray”:

FILE* fp_out = fopen("file_out.mpg",“w+”);
~/tmp/testC/Test1$ gcc main.c -Wl,-Map,empty.map -o Empty
main.c: In function 鈥[01mmain鈥

                                 main.c:9:38: error: stray 鈥[01m\342鈥in program
  FILE* fp_out = fopen("file_out.mpg",[m€渨+鈥;
                                      ^
main.c:9:39: error: stray 鈥[01m\200鈥in program
  FILE* fp_out = fopen("file_out.mpg",[01;31m€渨+鈥;
                                       ^
main.c:9:40: error: stray 鈥[01m\234鈥in program
  FILE* fp_out = fopen("file_out.mpg",鈥[mw+鈥;
                                        ^
main.c:9:41: error: 鈥[01mw鈥undeclared (first use in this function)
  FILE* fp_out = fopen("file_out.mpg",鈥[01;31mw+鈥;
                                         ^
main.c:9:41: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:43: error: stray 鈥[01m\342鈥in program
  FILE* fp_out = fopen("file_out.mpg",鈥渨+[m€;
                                           ^
main.c:9:44: error: stray 鈥[01m\200鈥in program
  FILE* fp_out = fopen("file_out.mpg",鈥渨+[01;31m€;
                                            ^
main.c:9:45: error: stray 鈥[01m\235鈥in program
  FILE* fp_out = fopen("file_out.mpg",鈥渨+鈥[m);
                                             ^
main.c:9:46: error: expected expression before 鈥[01m)鈥token
  FILE* fp_out = fopen("file_out.mpg",鈥渨+鈥[01;31m);

原因是,双引号使用成中文了。
  

 FILE* fp_out = fopen("file_out.mpg",w+);

改成英文双引号后,编译OK

FILE* fp_out = fopen("abuf_apu_nbsm_o1_1_00720_out.mpg","w+");

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值