当前位置: 首页>>代码示例>>C++>>正文


C++ CDatabase::GetTitle方法代码示例

本文整理汇总了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;
}
开发者ID:Tracyxzh,项目名称:MFCContact,代码行数:63,代码来源:Person.cpp


注:本文中的CDatabase::GetTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。