typedef struct _test {
int id;
char name[20];
int level;
int stock;
double price;
int d;
} Test;
对结构体赋值,一般是顺序赋值,或者指定赋值
比如
Test test[] = {
{1, "abc", 1, 2, 1.2, 3},//对应id, name, level, stock, price, d
{.id = 2, .level=3, price=4.2, .stock=2},//这个就是指定赋值,点后面接的是结构体成员名
};