typedef struct
{
char key[32];
char line[128];
}INI_LINE_S;
INI_LINE_S lines[] = {0}; //零长数组
INI_LINE_S line1 = {"111", "11111"};
memcpy(&lines[0], &line1, sizeof(INI_LINE_S));
INI_LINE_S line2 = {"222", "22222"};
memcpy(&lines[1], &line2, sizeof(INI_LINE_S));
INI_LINE_S line3 = {"333", "33333"};
memcpy(&lines[2], &line3, sizeof(INI_LINE_S));
谨慎使用!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)