struct GLtjkind //定义结构类型
{
bool Tjyn;
int Tjmin;
int Tjmax;
};
GLtjkind *GLtj;
GLtj=new GLtjkind[12]; //定义新的结构数组
//存储二进制存储的结构数组文件
if (SaveDialog1->Execute())
{
ofstream outfile(SaveDialog1->FileName.c_str(),ios::binary);
outfile.write((char*)GLtj,sizeof(GLtjkind[12]));
outfile.close();
}
//读取二进制存储的结构数组文件
if (OpenDialog1->Execute())
{
ifstream infile(OpenDialog1->FileName.c_str(),ios::binary);
infile.read((char*)GLtj,sizeof(GLtjkind[12]));
}