<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[copy的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/copy</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; copy]]></copyright><item><title><![CDATA[Effective STL: Item 21: Always have comparison functions return]]></title><link>https://blog.youkuaiyun.com/copy/article/details/5210</link><guid>https://blog.youkuaiyun.com/copy/article/details/5210</guid><author>copy</author><pubDate>Wed, 06 Jun 2001 22:07:00 +0800</pubDate><description><![CDATA[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]]></description><category></category></item><item><title><![CDATA[Effective STL:Item 16: Know how to pass vector and string data to]]></title><link>https://blog.youkuaiyun.com/copy/article/details/5209</link><guid>https://blog.youkuaiyun.com/copy/article/details/5209</guid><author>copy</author><pubDate>Wed, 06 Jun 2001 22:05:00 +0800</pubDate><description><![CDATA[ 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]]></description><category></category></item><item><title><![CDATA[Effective STL: Item 2: Beware the illusion of container-independent]]></title><link>https://blog.youkuaiyun.com/copy/article/details/5208</link><guid>https://blog.youkuaiyun.com/copy/article/details/5208</guid><author>copy</author><pubDate>Wed, 06 Jun 2001 09:06:00 +0800</pubDate><description><![CDATA[    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]]></description><category></category></item><item><title><![CDATA[条款14  基类的析构函数一定要定义为虚拟函数(From Effective C++)]]></title><link>https://blog.youkuaiyun.com/copy/article/details/5207</link><guid>https://blog.youkuaiyun.com/copy/article/details/5207</guid><author>copy</author><pubDate>Tue, 05 Jun 2001 20:26:00 +0800</pubDate><description><![CDATA[    有时一个类需要知道当前有多少个该类的对象，达到这个目的最直接的方式是定义一个用于统计对象个数的静态成员变量。该变量被初始化为0，调用类构造函数时增加1，调用析构函数时减少1。假设你正在编写一个军用程序，其中一个表示敌军目标的类定义如下：class EnemyTarget {public:  EnemyTarget() { ++numTargets; }  EnemyTarget(con]]></description><category></category></item></channel></rss>