error C3872: '0x3000': this character is not allowed in an identifier 解决方法

本文介绍了一种常见的编译错误——由全角空格引起的错误,并提供了详细的解决方案:使用UltraEdit或其他编辑软件将全角空格替换为半角空格。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

编译时遇到这个错误多半是从网上拷贝一段代码到VS里然后编译时产生的,这是因为拷贝过来的代码里有全角空格的原因。

 

解决方法就是把这段代码放到记事本里用UltraEdit或者其他有查找替换功能的编辑软件里,选择替换把全角空格替换成半角

就好了。

*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' compiling ds18b20.c... ds18b20.h(1): error: #77-D: this declaration has no storage class or type specifier *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(1): error: #65: expected a ";" *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(1): error: #26: too many characters in character constant *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(1): warning: #192-D: unrecognized character escape sequence *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(1): warning: #192-D: unrecognized character escape sequence *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(1): warning: #192-D: unrecognized character escape sequence *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(1): error: #26: too many characters in character constant *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\qianrushi.app\ARM\bianyiqi\Bin' ds18b20.h(3): error: #10: "#" not expected here ds18b20.c(67): error: #254: type name is not allowed ds18b20.h(5): error: #10: "#" not expected here ds18b20.c(67): error: #65: expected a ";" ds18b20.h(7): error: #10: "#" not expected here ds18b20.c(67): error: #20: identifier "i" is undefined ds18b20.h(9): error: #10: "#" not expected here ds18b20.c(99): error: #254: type name is not allowed ds18b20.h(11): error: #10: "#" not expected here ds18b20.c(99): error: #65: expected a ";" ds18b20.h(13): error: #10: "#" not expected here ds18b20.c(99): error: #20: identifier "i" is undefined ds18b20.h(15): error: #10: "#" not expected here ds18b20.c(181): error: #254: type name is not allowed ds18b20.h(17): error: #10: "#" not expected here ds18b20.c(181): error: #65: expected a ";" ds18b20.h(19): error: #10: "#" not expected here ds18b20.c(181): error: #20: identifier "i" is undefined ds18b20.h(22): warning: #1-D: last line of file ends without a newline "ds18b20.c" - 9 Error(s), 0 Warning(s). ds18b20.c(52): warning: #12-D: parsing restarts here after previous syntax error delay_us(400); ds18b20.c(53): error: #169: expected a declaration return 0; // ??? ds18b20.c(54): error: #169: expected a declaration } ds18b20.c(131): warning: #12-D: parsing restarts here after previous syntax error delay_us(55); // ?????? ds18b20.c(132): error: #169: expected a declaration } ds18b20.c(135): error: #169: expected a declaration } ds18b20.c(184): warning: #12-D: parsing restarts here after previous syntax error return temperature; ds18b20.c(185): error: #169: expected a declaration } ds18b20.c: 7 warnings, 18 errors "ds18b20.c" - 18 Error(s), 7 Warning(s).
最新发布
06-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

danxuezx

如果对你有用是我的快乐

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值