error: expected ',' or '...' before numeric

本文详细解析了在Arduino编程中遇到的一个常见错误:在WProgram.h文件中定义单字母宏时导致的语法问题。通过具体代码示例,本文深入探讨了错误产生的原因,并提供了正确的解决方案。

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

Solution for error: expected ',' or '...' before numeric


t's probably best not to go defining single letter #define's
because in WProgram.h, at line 16, there is this:

Code:
uint16_t makeWord(byte h, byte l);

Your
Code:
#define h 29
...
#define l 31
causes that line to be interpreted as this:
Code:
uint16_t makeWord(byte 29, byte 31);
which isn't legal C/C++



src:http://forum.arduino.cc/index.php/topic,43729.0.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值