在程序中定义结构体出错
typedef struct node{
uint Year,Date,Time;
uchar Value;
}Record;
在程序中定义结构,出现错误,请问是什么原因?
Record bank3 *SampleValue;
SampleValue->Year=0x2007; //将这一行注释掉就能编译通过了
uchar Count=0; /*开始出现错误的那一行*/
Advisory : use --help option or refer to the user manual for option details
Error D:\projects\LUX-Meter\LUX-Meter.c 44 : probable missing "}" in previous block
Error D:\projects\LUX-Meter\LUX-Meter.c 45 : type redeclared
Error D:\projects\LUX-Meter\LUX-Meter.c 46 : ")" expected
Error D:\projects\LUX-Meter\LUX-Meter.c 46 : type redeclared
Error D:\projects\LUX-Meter\LUX-Meter.c 47 : no identifier in declaration 不是编译器的问题
SampleValue->Year=0x2007;
//赋值以后又定义了一个变量造成出错,C++可以,C不行的
uchar Count=0;
页:
[1]