class info_Project
{
private:
ofstream new_file;
UnicodeString name_File;
TStrings text[4];
UnicodeString name_Project;
public:
info_Project(UnicodeString name)
{
name_File=name;
name_Project=Application->ExeName;
text[0].Text=name_Project;
text[1].Text=ExtractFileDir(name_Project);
text[2].Text=ExtractFileExt(name_Project);
text[3].Text=ExtractFileDrive(name_Project);
}
void save_Info()
{
int i;
new_file.open(name_File.w_str());
for(i=0;i<4;i++)
new_file<<(*text)[i].w_str()<<"\n";
new_file.close();
}
};
void __fastcall TForm1::Button1Click(TObject *Sender)
{
info_Project INFO("date_project.txt");
INFO.save_Info();
}
Brak komentarzy:
Prześlij komentarz