码迷,mamicode.com
首页 >  
搜索关键字:str    ( 67828个结果
【ThinkingInC++】12、宏处理定义
/** * 功能:宏处理定义 * 时间:2014年8月1日09:07:33 * 作者:cutter_point */ #include #include using namespace std; #define PRINT(STR, VAR) cout<<STR "=" <<VAR<<endl; //这里宏定义之后,所有PRINT("STR", VAR) //都会被cout之后的东西所覆盖...
分类:编程语言   时间:2014-08-12 22:15:24    阅读次数:208
Milk Patterns
poj3261:http://poj.org/problem?id=3261题意:题解: 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn=20010; 6 char str[maxn]; 7 int w...
分类:其他好文   时间:2014-08-12 21:41:34    阅读次数:244
Musical Theme
poj1743:http://poj.org/problem?id=1743题意:题解: 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn=20010; 6 char str[maxn]; ...
分类:其他好文   时间:2014-08-12 21:37:44    阅读次数:259
如何让EasyUI弹出层跳出框架
这个的解决方法其实挺简单的。只要在最外面的框架页面加个div,然后用parent.div的id就可以的。但是必须得弹出框得是一个页面。 //外层弹出框1 function openFirstWin(url, title, width, height) { var strWidth; var str....
分类:其他好文   时间:2014-08-12 21:35:34    阅读次数:159
我要好offer之 str/mem系列手写代码
1. str*系列手写代码a. 一定要注意末尾'\0'的处理,切记切记b. 一定要对输入做有效性判断,多用断言就是了int Strlen(const char* str) { assert(str != NULL); const char* tmp = str; while (*t...
分类:其他好文   时间:2014-08-12 21:33:04    阅读次数:265
Long Long Message
poj2774:http://poj.org/problem?id=2774题意:题解: 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn=220010; 6 char str[maxn]; ...
分类:其他好文   时间:2014-08-12 21:32:44    阅读次数:267
gets和fgets函数的区别
1. gets与fgets gets函数原型:char*gets(char*buffer);//读取字符到数组:gets(str);str为数组名。 gets函数功能:从键盘上输入字符,直至接受到换行符或EOF时停止,并将读取的结果存放在buffer指针所指向的字符数组中。 读取...
分类:其他好文   时间:2014-08-12 21:27:24    阅读次数:303
深度克隆一个对象
至于为什么要去实现对象的深度克隆,这里就不说了,直接说实现,也是看别人代码总结的: 1 function cloneObject( obj ) { 2 var str = ''; 3 var newObj = obj.constructor === Array ? [...
分类:其他好文   时间:2014-08-12 21:21:04    阅读次数:183
Lua 遍历Linux目录下的文件夹
代码如下,里面有注释,应该能看懂。function getFile(file_name) local f = assert(io.open(file_name, 'r')) local string = f:read("*all") f:close() return str...
分类:系统相关   时间:2014-08-12 18:51:24    阅读次数:981
输入一个字符串,求字符的所有排列
#include #include #include using namespace std; void ComStr(char *str, string &s,int m) { if (m == 0) { cout<<s<<endl; return ; } if (*str != '\0') { s.push_back(*str); ComStr(str+1,s ...
分类:其他好文   时间:2014-08-12 17:14:34    阅读次数:223
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!