error C3872: "0xa0": 此字符不允许在标识符中使用

本文详细介绍了在编程过程中遇到0xa0导致汉字乱码的解决方案,通过检查并替换代码中的英文输入法空格,将问题轻松解决。重点在于理解0xa0代表的十六进制数值及其在字符编码中的意义。
       

     这是因为直接复制代码的问题。0xa0是十六进制数,换成十进制就是160,表示汉字的开始。

     解决办法:在报错的代码行检查两边的空格,用英文输入法的空格替换掉。

Build target 'Target 1' compiling Matrixkey.c... Delay.h(1): warning C315: unknown #directive 'ifndef__DELAY_H__' Delay.h(2): warning C315: unknown #directive 'define__DELAY_H__' Delay.h(6): warning C312: misplaced endif control Matrixkey.c(9): error C100: unprintable character 0xA3 skipped Matrixkey.c(9): error C100: unprintable character 0xA8 skipped Matrixkey.c(9): error C202: 'ifP1_7': undefined identifier Matrixkey.c(9): error C141: syntax error near ')' Matrixkey.c(10): error C100: unprintable character 0xA3 skipped Matrixkey.c(10): error C100: unprintable character 0xA8 skipped Matrixkey.c(10): error C202: 'ifP1_6': undefined identifier Matrixkey.c(10): error C141: syntax error near ')' Matrixkey.c(11): error C100: unprintable character 0xA3 skipped Matrixkey.c(11): error C100: unprintable character 0xA8 skipped Matrixkey.c(11): error C202: 'ifP1_5': undefined identifier Matrixkey.c(11): error C141: syntax error near ')' Matrixkey.c(12): error C100: unprintable character 0xA3 skipped Matrixkey.c(12): error C100: unprintable character 0xA8 skipped Matrixkey.c(12): error C202: 'ifP1_4': undefined identifier Matrixkey.c(12): error C141: syntax error near ')' Matrixkey.c(16): error C100: unprintable character 0xA3 skipped Matrixkey.c(16): error C100: unprintable character 0xA8 skipped Matrixkey.c(16): error C202: 'ifP1_7': undefined identifier Matrixkey.c(16): error C141: syntax error near ')' Matrixkey.c(17): error C100: unprintable character 0xA3 skipped Matrixkey.c(17): error C100: unprintable character 0xA8 skipped Matrixkey.c(17): error C202: 'ifP1_6': undefined identifier Matrixkey.c(17): error C141: syntax error near ')' Matrixkey.c(18): error C100: unprintable character 0xA3 skipped Matrixkey.c(18): error C100: unprintable character 0xA8 skipped Matrixkey.c(18): error C202: 'ifP1_5': undefined identifier Matrixkey.c(18): error C141: syntax error near ')' Matrixkey.c(19): error C100: unprintable character 0xA3 skipped Matrixkey.c(19): error C100: unprintable character 0xA8 skipped Matrixkey.c(19): error C202: 'ifP1_4': undefined identifier Matrixkey.c(19): error C141: syntax error near ')' Matrixkey.c(23): error C100: unprintable character 0xA3 skipped Matrixkey.c(23): error C100: unprintable character 0xA8 skipped Matrixkey.c(23): error C202: 'ifP1_7': undefined identifier Matrixkey.c(23): error C141: syntax error near ')' Matrixkey.c(24): error C100: unprintable character 0xA3 skipped Matrixkey.c(24): error C100: unprintable character 0xA8 skipped Matrixkey.c(24): error C202: 'ifP1_6': undefined identifier Matrixkey.c(24): error C141: syntax error near ')' Matrixkey.c(25): error C100: unprintable character 0xA3 skipped Matrixkey.c(25): error C100: unprintable character 0xA8 skipped Matrixkey.c(25): error C202: 'ifP1_5': undefined identifier Matrixkey.c(25): error C141: syntax error near ')' Matrixkey.c(26): error C100: unprintable character 0xA3 skipped Matrixkey.c(26): error C100: unprintable character 0xA8 skipped Matrixkey.c(26): error C202: 'ifP1_4': undefined identifier Matrixkey.c(26): error C141: syntax error near ')' Matrixkey.c(30): error C100: unprintable character 0xA3 skipped Matrixkey.c(30): error C100: unprintable character 0xA8 skipped Matrixkey.c(30): error C202: 'ifP1_7': undefined identifier Matrixkey.c(30): error C141: syntax error near ')' Matrixkey.c(31): error C100: unprintable character 0xA3 skipped Matrixkey.c(31): error C100: unprintable character 0xA8 skipped Matrixkey.c(31): error C202: 'ifP1_6': undefined identifier Matrixkey.c(31): error C141: syntax error near ')' Matrixkey.c(32): error C100: unprintable character 0xA3 skipped Matrixkey.c(32): error C100: unprintable character 0xA8 skipped Matrixkey.c(32): error C202: 'ifP1_5': undefined identifier Matrixkey.c(32): error C141: syntax error near ')' Matrixkey.c(33): error C100: unprintable character 0xA3 skipped Matrixkey.c(33): error C100: unprintable character 0xA8 skipped Matrixkey.c(33): error C202: 'ifP1_4': undefined identifier Matrixkey.c(33): error C141: syntax error near ')' Target not created. Build Time Elapsed: 00:00:00什么问题
最新发布
09-15
Build target 'Target 1' compiling jx.c... LCD_128X64.H(23): error C141: syntax error near ')' JX.C(12): error C141: syntax error near ';' JX.C(13): error C202: 'i': undefined identifier JX.C(14): error C202: 'i': undefined identifier JX.C(15): error C202: 'j': undefined identifier JX.C(29): error C202: 'adc_value': undefined identifier JX.C(30): error C141: syntax error near 'float' JX.C(30): error C202: 'lux': undefined identifier JX.C(31): error C202: 'lux': undefined identifier compiling lcd_128x64.c... LCD_128X64.H(23): error C141: syntax error near ')' LCD_128X64.C(22): error C141: syntax error near ';' LCD_128X64.C(23): error C202: 'i': undefined identifier LCD_128X64.C(24): error C202: 'i': undefined identifier LCD_128X64.C(25): error C202: 'j': undefined identifier LCD_128X64.C(49): error C141: syntax error near ')' LCD_128X64.C(53): error C141: syntax error near 'data' LCD_128X64.C(53): error C190: '&': not an lvalue LCD_128X64.C(53): error C141: syntax error near ')' LCD_128X64.C(53): error C141: syntax error near ':' LCD_128X64.C(54): error C141: syntax error near 'data' LCD_128X64.C(54): error C190: '&': not an lvalue LCD_128X64.C(54): error C141: syntax error near ')' LCD_128X64.C(54): error C141: syntax error near ':' LCD_128X64.C(55): error C141: syntax error near 'data' LCD_128X64.C(55): error C190: '&': not an lvalue LCD_128X64.C(55): error C141: syntax error near ')' LCD_128X64.C(55): error C141: syntax error near ':' LCD_128X64.C(56): error C141: syntax error near 'data' LCD_128X64.C(56): error C190: '&': not an lvalue LCD_128X64.C(56): error C141: syntax error near ')' LCD_128X64.C(56): error C141: syntax error near ':' LCD_128X64.C(57): error C141: syntax error near 'data' LCD_128X64.C(57): error C190: '&': not an lvalue LCD_128X64.C(57): error C141: syntax error near ')' LCD_128X64.C(57): error C141: syntax error near ':' LCD_128X64.C(58): error C141: syntax error near 'data' LCD_128X64.C(58): error C190: '&': not an lvalue LCD_128X64.C(58): error C141: syntax error near ')' LCD_128X64.C(58): error C141: syntax error near ':' LCD_128X64.C(59): error C141: syntax error near 'data' LCD_128X64.C(59): error C190: '&': not an lvalue LCD_128X64.C(59): error C141: syntax error near ')' LCD_128X64.C(59): error C141: syntax error near ':' LCD_128X64.C(60): error C141: syntax error near 'data' LCD_128X64.C(60): error C190: '&': not an lvalue LCD_128X64.C(60): error C141: syntax error near ')' LCD_128X64.C(60): error C141: syntax error near ':' compiling adc.c... ADC.H(10): error C129: missing ';' before 'ADC_Read'根据以上的代码为我解决这些问题
06-19
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值