相关疑难解决方法(0)

C中的宏定义错误?

#define SOUND_SPEED 0.034;    
int rtt; //round trip time in microsecond
double distance;
distance = (double)(rtt*SOUND_SPEED)/2;
Run Code Online (Sandbox Code Playgroud)

它抱怨错误:'/'标记之前的预期表达.是不是因为我不能使用宏来定义小数或什么?

c macros c-preprocessor

3
推荐指数
1
解决办法
3156
查看次数

标签 统计

c ×1

c-preprocessor ×1

macros ×1