一般出现这种报错原因在于: 全局变量c的值不能在编译时确定,要在执行时确定
#include <stdio.h>
int a = 1;
int b = 1;
int c = a+b;
问题出在int c=a+b;这是不可以的。
还有另一种情况报错,就是回调函数的使用,wakeup()是回调函数。
错误:registerEventCallback ( wakeup());
正确:registerEventCallback (& wakeup);
一般出现这种报错原因在于: 全局变量c的值不能在编译时确定,要在执行时确定
#include <stdio.h>
int a = 1;
int b = 1;
int c = a+b;
问题出在int c=a+b;这是不可以的。
还有另一种情况报错,就是回调函数的使用,wakeup()是回调函数。
错误:registerEventCallback ( wakeup());
正确:registerEventCallback (& wakeup);