Pointers 在C中初始化特定成员
我想定义structPointers 在C中初始化特定成员,pointers,struct,Pointers,Struct,我想定义struct #include <stdio.h> #include <stdint.h> #include <time.h> //#include "templog.h" #define DATE_SIZE 5 typedef struct { int id; int year; int month; int mday; float min_temp, max_temp; } tem
#include <stdio.h>
#include <stdint.h>
#include <time.h>
//#include "templog.h"
#define DATE_SIZE 5
typedef struct {
int id;
int year;
int month;
int mday;
float min_temp, max_temp;
} tempValue_t
我收到了消息
error field name not in record or union initializer
最后发现,即使嵌套结构可以用(.)初始化,也可以初始化结构成员
error field name not in record or union initializer