【发布时间】:2012-03-28 23:27:52
【问题描述】:
我想将一个结构保存到一个 db 文件(或 .txt,这仍然很重要!)但我遇到了以下问题。我想在结构中创建结构,如下面的代码。
typedef struct classes cl;
typedef struct attribute a;
struct classes{ \\where "a" is a type of struct
a hunter;
a channeler;
a warrior;
a rogue; };
struct human{ \\where "cl" is type of struct classes (
cl Borderlands;
cl Shienear;
cl Arafel;
cl Illian;
cl Tear;
cl Tarabon;
cl Andor;
cl TwoRivers;
cl Amandor;
cl Mayene;
cl Murandy;
};
问题是我是否有一个变量 构建人类数据 我必须保存树的所有分支(因为我认为它是我创建的树),还是只保存根,我是否保存整个结构?
附:请原谅我的写作方式,我没有编程经验
【问题讨论】:
标签: c database struct tree save