标题: 这个为什么错了error C141: syntax error near '}', expected 'hdata' [打印本页]

作者: 曾小超    时间: 2023-5-21 16:24
标题: 这个为什么错了error C141: syntax error near '}', expected 'hdata'
为啥错了呀。求指导
error C141: syntax error near '}', expected 'hdata'

51hei.png (242.94 KB, 下载次数: 42)

51hei.png

作者: 13205495918    时间: 2023-5-21 16:50
把整个代码发过来吧,或者你可以参考一下本网站这个网页http://www.51hei.com/bbs/dpj-210658-1.html
作者: Hephaestus    时间: 2023-5-21 17:05
错误发生在第8行以前,你没有贴出来。
作者: angmall    时间: 2023-5-21 18:20
你应该没有定义uchar
要定义 #define uchar unsigned char

作者: Hephaestus    时间: 2023-5-21 18:45
angmall 发表于 2023-5-21 18:20
你应该没有定义uchar
要定义 #define uchar unsigned char

还有10~13行是实体语句,如果是C51一定是错误的,必须先定义所有变量,才能写实体语句。如果是RVMDK那么打开c99开关就可以边定义边使用了。
作者: 曾小超    时间: 2023-5-21 18:57
Hephaestus 发表于 2023-5-21 17:05
错误发生在第8行以前,你没有贴出来。

懂了懂了,我问了下,原来是没有消影
作者: xxpp2011    时间: 2023-5-21 21:42
显示出来的内容无错误,可能是函数未定义




欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1