码迷,mamicode.com
首页 >  
搜索关键字:str1    ( 1981个结果
睡不着,复习一下C++基础中的基础(深拷贝与浅拷贝)
#include #include #include using namespace std; //声明字符串拷贝函数char* mystrcpy(char* str1,const char* str2);class CPerson{ char* m_pName;public: C...
分类:编程语言   时间:2015-09-26 06:58:09    阅读次数:188
字符串转化为数字相加输出
设计思想:将字符串转化为数字,然后相加,最后输出和。程序流程图:源程序代码:public class JavaAdd { public static void main(String[] args){ String str1 = "12"; String str2 ="23"; int toInt1...
分类:其他好文   时间:2015-09-24 23:56:24    阅读次数:504
编辑距离
#include #include #include #include using namespace std;int edit(string str1, string str2){ int res; int n1 = str1.size(); int n2 = str2.size...
分类:其他好文   时间:2015-09-22 12:43:04    阅读次数:202
文件操作类CFile
CFile file; CString str1= L"写入文件成功!"; wchar_t *str2; if (!file.Open(L"Hello.txt", CFile::modeReadWrite| CFile::modeRead)) { AfxMess...
分类:其他好文   时间:2015-09-21 15:34:05    阅读次数:186
JSON解析字符串
JSON解析字符串JSON 解析字符串时,应按严格的标准,否则无法解析;str1 = '{"str":"string","number":123,"logic":true}';str2 = ''{'str':'string','number':123,'logic':true}'';str1 str...
分类:Web程序   时间:2015-09-21 13:54:52    阅读次数:147
网易游戏笔试题
该题目的要求是 判断str1和str2能否归并成为str3,递归的思路是正确的bool helper(string &str_x,string &str_y,int x,int y){ while(x>nums; string str1,str2,str3; for(int...
分类:其他好文   时间:2015-09-21 08:04:59    阅读次数:185
前端笔试题目小结--获取输入参数用户名;查询URL字符串参数
编写一个JavaScript函数getSuffix,用于获得输入参数的后缀名。如输入abc.txt,返回txt。 1 str1 = "abc.txt"; 2 function getSuffix(str) 3 { 4 var index =str.indexOf("."); 5 if(i...
分类:Web程序   时间:2015-09-20 23:52:15    阅读次数:536
hiho Mission Impossible 6(模拟 未提交验证。。)
题意:模拟文本操作思路:模拟#include#include#includeusing namespace std;#define MAXN 10005int M;char cmd[MAXN];char str1[MAXN],str2[MAXN];char copyStr[MAXN];void f(...
分类:其他好文   时间:2015-09-20 22:19:21    阅读次数:299
OC字符串查找
OC中字符串查找操作 1 #import 2 3 int main(int argc, const char * argv[]) { 4 @autoreleasepool { 5 //查找字符串 6 NSString *str1=@"abcdef"; 7 ...
分类:其他好文   时间:2015-09-20 20:47:13    阅读次数:164
OC字符串比较方法
OC字符串比较常用方法 1 #import 2 3 int main(int argc, const char * argv[]) { 4 @autoreleasepool { 5 6 //字符串比较方法 7 NSString *str1=@"abc";...
分类:其他好文   时间:2015-09-20 20:35:07    阅读次数:191
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!