完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
|
#include
#include "DS12C887.H" #include "delay.h" #include "system.h" void port_init(void); void ds_r_tim(SYSTEMTIME *currenttime); SYSTEMTIME *currenttime; // 当前时间 void main(void) { void port_init(void); void ds12c887_init(void); void ds_r_tim(SYSTEMTIME *currenttime); } void port_init(void) { P0 = 0XFF; P2 = 0XFF; } 程序写成这样编译可以通过, 0 errors;只提示有未调用的函数的警告信息,但是如果把主函数中的 void port_init(void); void ds12c887_init(void); void ds_r_tim(SYSTEMTIME *currenttime); 这三句写成 port_init(); ds12c887_init(); ds_r_tim(SYSTEMTIME *currenttime); 就报语法错误 MAIN.C(15): error C141: syntax error near 'SYSTEMTIME' 加上void以后变成如下: port_init(); ds12c887_init(); void ds_r_tim(SYSTEMTIME *currenttime); 继续报错: MAIN.C(15): error C141: syntax error near 'void' 这是编译器的问题,还是我的程序有问题? |
|
相关推荐
2个回答
|
|
|
什么编译器啊?怎么会这样
|
|
|
|
|
|
keil uv4
|
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
265 浏览 0 评论
【原创】【RA4M2-SENSOR开发板评测】低功耗+USB综合测试
789 浏览 0 评论
1306 浏览 2 评论
787 浏览 0 评论
【RA4M2-SENSOR开发板评测】Analogue+Timers综合测试
1587 浏览 0 评论
【youyeetoo X1 windows 开发板体验】少儿AI智能STEAM积木平台
16902 浏览 31 评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 11:08 , Processed in 0.720253 second(s), Total 72, Slave 55 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1818