VS2010 mfc CString转const char *
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了VS2010 mfc CString转const char *相关的知识,希望对你有一定的参考价值。
很简单,一句话:
1 CFileDialog fileDlg(TRUE,NULL,NULL,0,szFilter,this);//这是一个文件打开对话框 2 const char* filename=(char *)(LPCTSTR)fileDlg.GetPathName();
以上是关于VS2010 mfc CString转const char *的主要内容,如果未能解决你的问题,请参考以下文章
在vs2010 MFC 项目中使用int i=5;CString str;str.Format("%d",i);编译时报错,提示str.Format参数不对
转VS2010/MFC编程入门之二十五(常用控件:组合框控件Combo Box)