我的编译器出现如下错误:
C51 编译器 V9.01 - SN:C1ADC-HAI60D 版权所有 KEIL ELEKTRONIK GmbH 1987 - 2009 * SEQUENCE.C 第 300 行中的 C260 警告:'=':指针截断 * SEQUENCE.C 第 301 行中的错误 C190:'&':不是左值
以下是我的代码:
struct myCond{
unsigned char currStatus;
unsigned char prevStatus;
unsigned int *timer;
unsigned char *flag;
}
struct myCond StatCond;
unsigned int data timerdata;
bit bdata timeflag;
void someSubroutine (void)
{
struct myCond *tempCond;
tempCond = &StatCond;
tempCond->timer = &((unsigned int)timerdata);
tempCond->flag = &((unsigned char)timeflag);
}