在一个类的构造函数中,CString s = _T("啦啦啦");就会乱码
解决方案 »
- 【提问】互动投影技术应该看一些什么书籍
- [散分]散分了,没有可用分的童鞋要注意了。。。
- 怎么让我的程序一运行就把自己移动到指定目录下(图标也随之消失)
- 请问在 VBscript 中如何调用 windows API ?有现成的ActiveX封装吗?
- 哪位做过RSS方面的开发,最好是VC方面的。。
- 我只有20分了,大吓帮帮忙!钩子(DLL)中向外发消息(两种方法,Window message和tcp),当调用dll的窗口不是活动的,dll就发不出消息,详情
- 高分求关于EMF图片格式的编程资料,源代码更好!
- 请教一下C++编译器中那个CL的命令怎么用 !(一些他的设置问题)
- 我要往按钮上加位图,我用LoadBitmap(HINSTANCE hInstance,LPCTSTR lpBitmapName),但是不知道这两个参数是什么,如何能获得。请高手指教
- 百度杀毒老是要修复,怎么办?
- vC连接数据库,界面问题
- 结构 PIMAGE_IMPORT_DESCRIPTOR 的问题
CString( const CString& stringSrc );
throw( CMemoryException );
CString( TCHAR ch, int nRepeat = 1 );
throw( CMemoryException );
CString( LPCTSTR lpch, int nLength );
throw( CMemoryException );
CString( const unsigned char* psz );
throw( CMemoryException );
CString( LPCWSTR lpsz );
throw( CMemoryException );
CString( LPCSTR lpsz );
throw( CMemoryException );参数: stringSrc 一个已经存在的CString对象,它要被拷贝到此CString对象中。
ch 要被重复nRepeat次的单个字符。
nRepeat 要对ch重复的次数。
lpch 一个指向字符数组的指针,该字符数组的长度是nLength,不包括结尾的空字符。
nLength pch中的字符的个数。
psz 一个要被拷贝到此CString对象中去的以空字符结尾的字符串。
lpsz 一个要被拷贝到此CString对象中去的以空字符结尾的字符串。 示例:下面的例子说明了如何使用String::CString。
// CString::CString示例:
CString s1; // 空字符串
CString s2( "cat" ); // 从一个文字的C字符串
CString s3 = s2; // 拷贝构造函数
CString s4( s2 + " " + s3 ); // 从一个字符串表达式
CString s5( 'x' ); // s5 = "x"
CString s6( 'x', 6 ); // s6 = "xxxxxx"
CString s7((LPCSTR)ID_FILE_NEW); // s7 = "Create a new document"
CString city = "Philadelphia"; // 不是赋值操作符