#include <stdio.h>
void main()
{
typedef struct test_str {
int x1;
int x2;
char y;
}str_type;
str_type test_array[2] = { {01,02,'y1'},{11,22,'y2'} };
printf("%d", test_array[1].x2);
}
C语言:结构体类型的数组即结构体数组怎么用?
于 2023-03-25 15:46:34 首次发布