会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
逻辑
不怨天,不尤人,坦然自若,依然故我。
首页
新随笔
订阅
管理
上一页
1
2
3
4
5
6
···
9
下一页
2014年10月9日
ctci1.1
摘要: boolcheck(char*str){if(str==NULL)returntrue;intlen=strlen(str);if(len==0)returntrue;mapplace;inti=0;for(i=0;i(str[i],true));elsereturnfalse;}returntru...
阅读全文
posted @ 2014-10-09 12:56 lycan785
阅读(97)
评论(0)
推荐(0)
2014年10月3日
java的final关键字
摘要: http://www.importnew.com/7553.htmlfinal Integet len = 10;len = 100;这样编译通不过,因为final指向的对象修改,但是final变量不可以指向新的对象,这里的赋值操作,就是指向了新对象。final Test test = new Te...
阅读全文
posted @ 2014-10-03 22:07 lycan785
阅读(114)
评论(0)
推荐(0)
java中的char类型所占空间
摘要: java中统一使用unicode编码,所以每个字符都是2个字节16位。unicode包括中文,所以对String类计算长度的时候,一个中文和一个英文都是一个长度。String voice = "好声音"; System.out.println(voice.length());输出的是3但是在C语言中...
阅读全文
posted @ 2014-10-03 21:34 lycan785
阅读(690)
评论(0)
推荐(0)
关于内存分配的文章
摘要: 关于内存分配的文章走进C++程序世界-----指针(动态申请空间和释放空间)http://blog.csdn.net/sjin_1314/article/details/11675591
阅读全文
posted @ 2014-10-03 11:07 lycan785
阅读(98)
评论(0)
推荐(0)
2014年10月2日
注意区别二位数组和二维指针
摘要: int a[][4];int *a[4];int ** a;int (*a)[4];注意这四种情况,搞懂这四种情况,就基本没问题了。转自:http://www.cnblogs.com/chenbin7/archive/2011/10/03/2198675.html#includeusingnames...
阅读全文
posted @ 2014-10-02 23:18 lycan785
阅读(137)
评论(0)
推荐(0)
防止野指针
摘要: delete以后使用 p = NULL
阅读全文
posted @ 2014-10-02 14:29 lycan785
阅读(106)
评论(0)
推荐(0)
2014年9月30日
const 函数参数
摘要: void func(int value);这样的函数,不可以这样子使用:const int value =100;func(value );因为func里面可能会对value进行更改,将const类型传入,里面的代码可能无法运行。
阅读全文
posted @ 2014-09-30 21:32 lycan785
阅读(292)
评论(0)
推荐(0)
2014年9月28日
leetcode 2SUM
摘要: structvp{intvalue;intplace;};boolcomp(conststructvpa,conststructvpb){returna.valuetwoSum(vector&numbers,inttarget){vectorv;for(inti=0;itarget){break...
阅读全文
posted @ 2014-09-28 11:15 lycan785
阅读(172)
评论(0)
推荐(0)
leetcode 4SUM
摘要: 自己写的比较差的,时间过不去#include#include#include#include#include#include#include#include#includeusingnamespacestd;stringato_string(intvalue){stringstreamss;ssv)...
阅读全文
posted @ 2014-09-28 10:56 lycan785
阅读(181)
评论(0)
推荐(0)
2014年9月27日
leetcode Evaluate Reverse Polish Notation
摘要: #include#include#include#include#include#include#includeusingnamespacestd;intevalRPN(vector&tokens){stackvalue;inti=0;for(i=0;is;s.push_back("4");s.pu...
阅读全文
posted @ 2014-09-27 23:23 lycan785
阅读(129)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
9
下一页
公告