思考3:用Write写入一个结构体数据。 struct Struct { int stuNum; char Name[20]; } CFile MyFile; Struct MyStruct; …//对MyStruct赋初值 MyFile.Open(“FileName”,CFile::modeRead); MyFile.Write((void*)&MyStruct,sizeof(Struct)); … MyFile.Close();
1