Re: Is it ok to inherit from vector?

From: lilburne (lilburne_at_godzilla.net)
Date: 11/13/03


Date: Wed, 12 Nov 2003 23:20:48 +0000

Freddy Flares wrote:
> Like this.
>
> /********************/
> class Card {
> public:
> Card() : rank(0), suit(0) {}
> ...
> private:
> int rank;
> int suit;
> };
>
> class Cards : public vector<Card> {
> public:
> Cards();
> ...
> };
> /********************/
>
> What about other STL types like string?
>

I wouldn't others would - see thread and make your own mind up.
http://groups.google.com/groups?as_umsgid=bn9qf1%24ukbq4%241%40ID-203936.news.uni-berlin.de



Relevant Pages