码迷,mamicode.com
首页 >  
搜索关键字:cstring    ( 6726个结果
使用CString类型的变量读取ini配置文件中的数据后,使用ReleaseBuffer释放
如果未使用ReleaseBuffer,会导致Find()函数查找失败! 1 { 2 GetPrivateProfileString("SZDeskConnections", strTemp.Right(1),NULL,strBuffer.GetBuffer(100),100,".\\RQTr...
分类:其他好文   时间:2015-04-03 16:54:53    阅读次数:116
【转】CString,string,char*综合比较
(一) 概述1.string和CString均是字符串模a板类;2.string为标准模板类(STL)定义的字符串类,已经纳入C++标准之中;3.CString(typedef CStringT> CString)为Visual C++中最常用的字符串类,继承自CSimpleStringT类,主要应...
分类:其他好文   时间:2015-04-03 15:07:07    阅读次数:133
【转】<string> <string.h> <cstring>的区别
#includevoidmain(){ stringaaa="abcsdd"; printf("lookingforabcfromabcdecd%s\n", (strcmp(aaa,"abc"))?"Found":"NotFound");}//不能正确执行,提示说是string类型没有定义而下...
分类:其他好文   时间:2015-04-03 11:08:49    阅读次数:179
TerminateProcess终止进程失败
今天写了个自动升级程序,   该程序从服务器下载客户端最新版本, 然后通过查找客户端进程的方式, 使用TerminateProcess终止进程, 代码如下: void KillProcess( CString strProName ) { PROCESSENTRY32 pe32; pe32.dwSize = sizeof(pe32); HANDLE hPro...
分类:系统相关   时间:2015-04-02 19:02:55    阅读次数:257
MFC-将CString转换成std::string
//将CString转换成const char * int stringLength = ::WideCharToMultiByte(CP_UTF8, NULL, video_path, wcslen(video_path), NULL, 0, NULL, NULL); char* buffer.....
分类:编程语言   时间:2015-04-02 18:27:45    阅读次数:210
CString和LPVOID的转换(线程参数传递)
msdn上说,CString可以用来随意替换const char* and LPCTSTR 类型的函数形参。随意转换就是了。具体不深究,解决问题先。 声明一下使用目的:给新开线程传入CString类型字符串值,但AfxBeginThread函数需要传入LPVOID类型参数。于是,矛盾开始了。 static  CString s=_T("640x480_3.jpg");//如果函数内,一...
分类:编程语言   时间:2015-04-02 15:05:37    阅读次数:187
inet_addr”: 不能将参数 1 从“CString”转换为“const char *”1>
[cpp]view plaincopyCStringipaddress;ipaddress="192.168.39.207";DWORDm_dwPuIp;m_dwPuIp=inet_addr(ipaddress);有一个错误:“inet_addr”: 不能将参数 1 从“CString”转换为“co...
分类:Web程序   时间:2015-04-01 15:05:28    阅读次数:162
CString char BSTR 转换
转自:http://www.cnblogs.com/lingyun1120/archive/2011/11/03/2234169.html一.CString, int, string, char*之间的转换string 转 CStringCString.Format("%s", string.c_s...
分类:其他好文   时间:2015-04-01 12:55:02    阅读次数:109
Cstring的使用
https://msdn.microsoft.com/zh-cn/aa3150431、字符串提取函数,CString::Left、CString::Mid、CString::RightCString::MidCString Mid( int nFirst ) const; throw( CMemor...
分类:其他好文   时间:2015-03-30 21:04:51    阅读次数:201
[最小表示法] HDU 2609 How many
题意: 给n个串,问不断的循环左移之后,有几个不相同的串。 思路: 全部转换的成字符串的最小表示法,统计。 裸题存模板 代码: #include"cstdlib" #include"cstdio" #include"cstring" #include"cmath" #include"queue" #include"algorithm" #include"iostream" #inclu...
分类:其他好文   时间:2015-03-30 16:33:37    阅读次数:145
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!