C++ 创建文件的方法

时间:2015-01-29 22:29:03   收藏:0   阅读:280
CString getPath(){
	CTime time = CTime::GetCurrentTime();
	CString t = time.Format(_T("%Y%m%d%H%M%S"));
	CString path("c://cjt//");
	path.Append(_T("device"));
	path.Append(t);
	path.Append(_T(".txt"));
}
int main(){
       CString path = getPath();
	if(!PathFileExists(_T("c://cjt"))){
		_mkdir("c://cjt");
	}      
}

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!