自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 Effective STL: Item 21: Always have comparison functions return

Let me show you something kind of cool. Create a set where less_equalis the comparison type, then insert 10 into the set:set > s; // s is sorted by “s.insert(10); // insert the value 10Now try inserti

2001-06-06 22:07:00 813 1

原创 Effective STL:Item 16: Know how to pass vector and string data to

 Since C++was standardized in 1998,the C++elite haven¡¯tbeenterri-blysubtle in their attempt to nudge programmers away from arraysand towards vectors. They¡¯ve been similarly overt in trying to get de

2001-06-06 22:05:00 1002

原创 Effective STL: Item 2: Beware the illusion of container-independent

    The STL is based on generalization. Arrays are generalized into con-tainersand parameterized on the types of objects they contain. Func-tionsare generalized into algorithms and parameterized on th

2001-06-06 09:06:00 872

原创 条款14 基类的析构函数一定要定义为虚拟函数(From Effective C++)

    有时一个类需要知道当前有多少个该类的对象,达到这个目的最直接的方式是定义一个用于统计对象个数的静态成员变量。该变量被初始化为0,调用类构造函数时增加1,调用析构函数时减少1。假设你正在编写一个军用程序,其中一个表示敌军目标的类定义如下:class EnemyTarget {public:  EnemyTarget() { ++numTargets; }  EnemyTarget(con

2001-06-05 20:26:00 1570

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除