读书人

怎么初始化结构体数组

发布时间: 2012-09-11 10:49:03 作者: rapoo

如何初始化结构体数组?
刚才发的帖不知道为什么打不开了?

C/C++ code
struct room{    char *id;    enum room_type type;    float fee;    char *user_id;    time_t in_time;    time_t out_time;    char *intro;};struct room big_room[BIG_COUNT];

struct room big_room[BIG_COUNT];这句话报错了,不能这样初始化结构体数组吗?应该怎么样初始化?

[解决办法]
不知道ZeroMemory好不好

读书人网 >C语言

热点推荐