很简单的一个程序,大家瞧瞧怎么回事?我用的英文下的分号
#include "stm32f10x.h"
int main(void)
{
struct SENSOR_TypeDef
{
uint16_t ADXL_X=0.0; //参数类型待确定
uint16_t ADXL_Y=0.0;
uint16_t ADXL_Z=0.0;
uint16_t GYR_X=0.0;
uint16_t GYR_Y=0.0;
uint16_t GYR_Z=0.0;
};
struct SENSOR_TypeDef SENSOR_DATA[5];
}
Rebuild target 'Target 1'
assembling startup_stm32f10x_hd.s...
compiling main.c...
main.c(6): error: #65: expected a ";"
main.c(7): error: #65: expected a ";"
main.c(8): error: #65: expected a ";"
main.c(9): error: #65: expected a ";"
main.c(10): error: #65: expected a ";"
main.c(11): error: #65: expected a ";"
main.c(13): warning: #177-D: variable "SENSOR_DATA" was declared but never referenced
Target not created |