码迷,mamicode.com
首页 >  
搜索关键字:cstring    ( 6726个结果
模式匹配-BF算法
/***字符串匹配算法***/ #include #include using namespace std; #define OK 1 #define ERROR 0 #define OVERFLOW -2 typedef int Status; #define MAXSTRLEN 255 //用户可在255以内定义最长串长 typedef char SString[MAXSTRLEN+...
分类:编程语言   时间:2014-10-23 12:27:37    阅读次数:334
CString string char* 之间的转换
下面是MFC/C++/C中字符类型CString, int, string, char*之间的转换的说明与举例,经常用的东西,相信对于用C/C++的朋友,还是比较有用的string,CString,char*之间的转化int 转 CString: CString.Format("%d",int); ...
分类:其他好文   时间:2014-10-21 19:09:36    阅读次数:268
HDoj-1250-Hat's Fibonacci-大数
Hat's Fibonacci Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7857    Accepted Submission(s): 2553 Problem Description A Fibonacci se...
分类:其他好文   时间:2014-10-21 17:47:16    阅读次数:215
MFC 获取下拉列表框的值,并设置静态文字框内的值
1 CString strInfo1;//存放下拉列表框选中的值2 int nSel1;//存放下拉列表框选中的索引3 nSel1 = m_combox_first.GetCurSel();//获取选中值的索引4 m_combox_first.GetLBText(nSel1,strInfo1);//...
分类:编程语言   时间:2014-10-21 15:17:15    阅读次数:278
uft8转gb函数
1 void UTF8ToGB(CString &szOut) 2 { 3 WCHAR *strSrc; 4 TCHAR *szRes; 5 //长度 6 int i = MultiByteToWideChar(CP_UTF8, 0, szOut, -1, NULL...
分类:其他好文   时间:2014-10-21 13:46:29    阅读次数:186
[AC自动机+dp+记录路径] hdu 2825 Ring
题意: 给N个长度,M个单词,每个单词有权值 输出长度不大于N的权值和最大的单词 代价相同输出长度短的,长度相同输出字典序最小 思路: 开一个字符串数组,暴力存储每个节点的单词! 其他思路和dp都一样 注意:如果和为零的话输出空串。 代码: #include"cstdlib" #include"cstdio" #include"cstring" #include"cmath" #...
分类:其他好文   时间:2014-10-21 12:21:12    阅读次数:243
关于C++String字符串的使用
要想使用标准C++中string类,必须要包含#include // 注意是,不是或cstring,带.h的是C语言中的头文件using std::string;using std::wstring;或using namespace std; String类是不可变(final)的,对String类的任何改变,都是返回一个新的String类对象.这样的话把String类的引用传递给一个方法,该方...
分类:编程语言   时间:2014-10-20 13:33:38    阅读次数:223
NYoj-Binary String Matching-KMP算法
Binary String Matching 时间限制:3000 ms  |  内存限制:65535 KB 难度:3 描述Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear as ...
分类:编程语言   时间:2014-10-18 09:50:53    阅读次数:238
判断CString字符串中各位是数字,大小写字母,符号,汉字.xml
//UNICODE字符集CStringstr=L"0123abc中文字符、/";CStringshuzi,biaodianfuhao,hanzi,daxiezimu,xiaoxiezimu;for(inti=0;i="0"){shuzi+=...
分类:其他好文   时间:2014-10-18 00:41:50    阅读次数:205
CString用法总结?.xml
1CString中保存着路径+文件名如:c:\目录\file.txt获得目录和文件名的方法: CStringpath=_T("c:\\目录\\file.txt");CStringdirectory;CStringfileName;inti=path.ReverseFind(_T('\\'));...
分类:其他好文   时间:2014-10-18 00:39:39    阅读次数:377
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!