如何在VS2010下的VC++编译环境下,这句话出错呢。CString strSelectedFile=CString(30)

怎么在VS2010下的VC++编译环境下,这句话出错呢。CString strSelectedFile=CString(30);
CString strSelectedFile=CString(30); 提示错误

------解决方案--------------------
请问这种写法规范吗?
CString strSelctedFile;就可以了。你的这种写法用在int上面是没问题的,后面的Cstring(30)一般是对字符串进行初始化的。而通过查看源码发现,CString并没有提供采用数值参数的搞糟函数.
CString();
CString(const CString& stringSrc);
CString(TCHAR ch, int nRepeat = 1);
CString(LPCSTR lpsz);
CString(LPCWSTR lpsz);
CString(LPCSTR lpch, int nLength);
CString(LPCWSTR lpch, int nLength);
CString(const unsigned char* psz);
------解决方案--------------------
C# code

没有这样的构造
CString strSelectedFile=CString("30");