本文整理汇总了C++中CDatabase::GetTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ CDatabase::GetTitle方法的具体用法?C++ CDatabase::GetTitle怎么用?C++ CDatabase::GetTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDatabase
的用法示例。
在下文中一共展示了CDatabase::GetTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveTXTFile
bool SaveTXTFile(CDatabase &d,CString &fn)
{
ofstream f;
CString s;
CPerson *p;
f.open(fn);
if(!f)
return false;
f<<(LPCTSTR)d.GetTitle()<<endl;
if(d.phead!=NULL)
{
p=d.phead;
f<<"--------------------------------------------------------------"<<endl;
f<<" 姓名:"<<(LPCTSTR)p->GetName()<<endl;
f<<"出生日期:"<<(LPCTSTR)p->GetBirthday()<<endl;
f<<" 籍贯:"<<(LPCTSTR)p->GetProvince()<<endl;
f<<" 性别:"<<(LPCTSTR)p->GetSex()<<endl;
f<<"所属分组:"<<(LPCTSTR)p->GetTeam()<<endl;
f<<" 职务:"<<(LPCTSTR)p->GetPosition()<<endl;
f<<" 专业:"<<(LPCTSTR)p->GetMajor()<<endl;
f<<" 学校:"<<(LPCTSTR)p->GetSchool()<<endl;
f<<" 班级:"<<(LPCTSTR)p->GetClass()<<endl;
f<<" 院系:"<<(LPCTSTR)p->GetCollege()<<endl;
f<<" 年级:"<<(LPCTSTR)p->GetGrade()<<endl;
f<<"家庭电话:"<<(LPCTSTR)p->GetPhone()<<endl;
f<<" 手机:"<<(LPCTSTR)p->GetMobi()<<endl;
f<<"家庭住址:"<<(LPCTSTR)p->GetAddress()<<endl;
f<<" 邮编:"<<(LPCTSTR)p->GetPostcode()<<endl;
f<<" QQ:"<<(LPCTSTR)p->GetQQ()<<endl;
f<<"电子邮箱:"<<(LPCTSTR)p->GetEmail()<<endl;
f<<" 传真:"<<(LPCTSTR)p->GetFax()<<endl;
f<<"个人主页:"<<(LPCTSTR)p->GetHomepage()<<endl;
f<<" 备注:"<<(LPCTSTR)p->GetMemo()<<endl;
while(p->next!=NULL)
{
p=p->next;
f<<"--------------------------------------------------------------"<<endl;
f<<" 姓名:"<<(LPCTSTR)p->GetName()<<endl;
f<<"出生日期:"<<(LPCTSTR)p->GetBirthday()<<endl;
f<<" 籍贯:"<<(LPCTSTR)p->GetProvince()<<endl;
f<<" 性别:"<<(LPCTSTR)p->GetSex()<<endl;
f<<"所属分组:"<<(LPCTSTR)p->GetTeam()<<endl;
f<<" 职务:"<<(LPCTSTR)p->GetPosition()<<endl;
f<<" 专业:"<<(LPCTSTR)p->GetMajor()<<endl;
f<<" 学校:"<<(LPCTSTR)p->GetSchool()<<endl;
f<<" 班级:"<<(LPCTSTR)p->GetClass()<<endl;
f<<" 院系:"<<(LPCTSTR)p->GetCollege()<<endl;
f<<" 年级:"<<(LPCTSTR)p->GetGrade()<<endl;
f<<"家庭电话:"<<(LPCTSTR)p->GetPhone()<<endl;
f<<" 手机:"<<(LPCTSTR)p->GetMobi()<<endl;
f<<"家庭住址:"<<(LPCTSTR)p->GetAddress()<<endl;
f<<" 邮编:"<<(LPCTSTR)p->GetPostcode()<<endl;
f<<" QQ:"<<(LPCTSTR)p->GetQQ()<<endl;
f<<"电子邮箱:"<<(LPCTSTR)p->GetEmail()<<endl;
f<<" 传真:"<<(LPCTSTR)p->GetFax()<<endl;
f<<"个人主页:"<<(LPCTSTR)p->GetHomepage()<<endl;
f<<" 备注:"<<(LPCTSTR)p->GetMemo()<<endl;
}
f<<"--------------------------------------------------------------"<<endl;
}
f.close();
return true;
}