- 博客(17)
- 资源 (1)
- 收藏
- 关注
转载 Some topics in C++
C++中我们可以用static修饰一个类的成员函数,也可以用const修饰类的成员函数(写在函数的最后表示不能修改成员变量,不是指写在前面表示返回值为常量)。请问:能不能同时用static和const修饰类的成员函数? 分析:答案是不可以。C++编译器在实现const的成员函数的时候为了确保该函数不能修改类的实例的状态,会在函数中添加一个隐式的参数const this*。但当一个成员为st
2013-01-31 15:09:39 241
转载 寻找出现频率超过一半的数
http://blog.csdn.net/johnny710vip/article/details/6930179假如每次删除两个不同的数(不管包括不包括最高频数),那么,在剩下的数字里,原最高频数出现的频率一样超过了50%,不断重复这个过程,最后剩下的将全是同样的数字,即最高频数。此算法避免的排序,时间复杂度只为O(N)。
2013-01-25 17:42:32 210
转载 判断是否有环和查找入环节点
http://www.cnblogs.com/zemliu/archive/2012/08/15/2640849.html
2013-01-24 16:56:06 418
转载 Segmentation fault(bus error or access violation)的原因
http://en.wikipedia.org/wiki/Segmentation_faultA segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to access a memory
2013-01-24 15:44:35 378
转载 side effect
http://www.learncpp.com/cpp-tutorial/33-incrementdecrement-operators-and-side-effects/A side effect is a result of an operator, expression, statement, or function that persists even after the operat
2013-01-23 10:59:47 261
转载 有关signal的函数(像SIG_IGN等等)
http://www.cplusplus.com/reference/csignal/signal/funcA pointer to a function. This may either be a function defined by the programmer or one of the following predefined functions:SI
2013-01-22 17:27:40 225
转载 An introduction to C++ Traits
http://accu.org/index.php/journals/442http://blog.csdn.net/chaoojie/article/details/7783727
2013-01-18 17:58:57 328
转载 auto_ptr VS unique_ptr
1. unique_ptr is not a direct replacement. The major flaw that it fixes is the implicit transfer of ownership.std::auto_ptr a(new int(10)), b;b = a; //implicitly transfers ownershipstd::unique_pt
2013-01-18 16:22:10 335
转载 STL中的associative container hash map 红黑树 hash table
hash_map was a common extension provided by many library implementations. That is exactly why it was renamed tounordered_map when it was added to the C++ standard as part of TR1. map is generally im
2013-01-05 13:44:24 349
转载 在数组里查找这样的数,它大于等于左侧所有数,小于等于右侧所有数
http://blog.csdn.net/beiyeqingteng/article/details/7167823
2013-01-01 17:43:47 255
转载 字符串的排列组合问题
http://www.360doc.com/content/12/0328/19/1429048_198701158.shtml
2013-01-01 16:51:22 187
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人