void CMy2Dlg::OnSave()
{ CFile m_file;
if(m_file.Open("****.dat",CFile::modeCreate|CFile::modeWrite))
{
CArchive ar(&m_file,CArchive::store);
m_list.Serialize(ar);
ar.Close();
m_file.Close();
}
AfxMessageBox("保存成功");
}
*.dat文件保存在当前的目录下,怎么使它放置在debug目录下。
{ CFile m_file;
if(m_file.Open("****.dat",CFile::modeCreate|CFile::modeWrite))
{
CArchive ar(&m_file,CArchive::store);
m_list.Serialize(ar);
ar.Close();
m_file.Close();
}
AfxMessageBox("保存成功");
}
*.dat文件保存在当前的目录下,怎么使它放置在debug目录下。
解决方案 »
- 获取键盘按键。
- 组合框 组合了什么呢?
- LINK : fatal error LNK1147: invalid number specified with option '/IGNORE:4198,4
- 怎样获得本机浏览器类型串(用来初始化HTTP请求头第5行,如: ,"User-Agent:Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)");
- 如何在VC++中获得微秒级的系统时间?
- 关于com组件与硬件驱动程序
- 视频传输的问题
- 系列入门级超级菜鸟送分问题,答对任一道都有分
- 编译时出现 “符号不能用在 using 声明中”; “不是“`global namespace'”的成员”
- CALLBACK是怎么一会事情?
- 如何得到从指定位置开始,指定长度的字符串?
- 关于进程的问题,请大家帮忙。
if(m_file.Open("d:/yourproject/debug/****.dat",CFile::modeCreate|CFile::modeWrite))