[置顶] Merge k Sorted Lists

只有注册用户登录后才能阅读该文。 阅读全文

posted @ 2015-10-28 17:55 forlihui 阅读(4) 评论(0) 推荐(0) 编辑

2015年12月10日

C++ using关键字作用总结

摘要: 1.在当前文件中引入命名空间这是我们最熟悉的用法,例如:using namespace std;2.在子类中使用 using 声明引入基类成员名称(参见C++ primer)在private或者protected继承时,基类成员的访问级别在派生类中更受限:class Base {public:std... 阅读全文

posted @ 2015-12-10 20:40 forlihui 阅读(130) 评论(0) 推荐(0) 编辑

2015年11月27日

C++的强制转换方式(转)

摘要: C 风格(C-style)强制转型如下:(T) expression 或T(expression) //函数风格(Function-style)两种形式之间没有本质上的不同。对于具有转换的简单类型而言C 风格转型工作得很好。然而,这样的转换符也能不分皂白地应用于类(class)和类的指针。ANSI-... 阅读全文

posted @ 2015-11-27 20:06 forlihui 阅读(139) 评论(0) 推荐(0) 编辑

线程create时参数的传递问题(转载)

摘要: 1.奇怪的线程参数初始化for(i=0;i{//会有什么问题?pthread_create(&tid,NULL,&thread_client_function,(void*)&i);}上面代码应该很容易明白,创建多个线程,传入序列号作为线程id。基实这里存在一个大bug,传递的参数会不成功!!示例代... 阅读全文

posted @ 2015-11-27 19:31 forlihui 阅读(268) 评论(0) 推荐(0) 编辑

C++的一些收藏blog

摘要: http://blog.csdn.net/vagrxie/article/category/296223/4 阅读全文

posted @ 2015-11-27 11:43 forlihui 阅读(83) 评论(0) 推荐(0) 编辑

2015年11月26日

类的静态成员函数相关

摘要: http://blog.csdn.net/morewindows/article/details/6721430/ 阅读全文

posted @ 2015-11-26 14:20 forlihui 阅读(80) 评论(0) 推荐(0) 编辑

设计模式

摘要: 单例模式 http://blog.csdn.net/hackbuteer1/article/details/7460019#include ... 阅读全文

posted @ 2015-11-26 13:45 forlihui 阅读(122) 评论(0) 推荐(0) 编辑

2015年11月25日

python的signal

摘要: 今天在使用python的signal时,发现第二个传的函数必须是拥有两个函数参数变量的 1 import signal 2 import time 3 flag = True 4 def func1(a,b): 5 ... 阅读全文

posted @ 2015-11-25 15:25 forlihui 阅读(132) 评论(0) 推荐(0) 编辑

2015年11月5日

set 和 vector的简单比较

摘要: set的常见问题(转)(1)为何map和set的插入删除效率比用其他序列容器高?大部分人说,很简单,因为对于关联容器来说,不需要做内存拷贝和内存移动。说对了,确实如此。set容器内所有元素都是以节点的方式来存储,其节点结构和链表差不多,指向父节点和子节点。结构图可能如下: A / \ B C... 阅读全文

posted @ 2015-11-05 23:30 forlihui 阅读(3649) 评论(0) 推荐(0) 编辑

2015年11月4日

Rotate Array

摘要: Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. 1 cl... 阅读全文

posted @ 2015-11-04 11:22 forlihui 阅读(98) 评论(0) 推荐(0) 编辑

2015年10月29日

Jump Game

摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu... 阅读全文

posted @ 2015-10-29 18:23 forlihui 阅读(110) 评论(0) 推荐(0) 编辑

导航