Re: Is it ok to inherit from vector?
From: lilburne (lilburne_at_godzilla.net)
Date: 11/13/03
- Next message: Michael Winter: "Re: Global Variables"
- Previous message: Niklas Borson: "Re: Passing Structure to a function"
- In reply to: Freddy Flares: "Is it ok to inherit from vector?"
- Next in thread: Gianni Mariani: "Re: Is it ok to inherit from vector?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Michael Winter: "Re: Global Variables"
- Previous message: Niklas Borson: "Re: Passing Structure to a function"
- In reply to: Freddy Flares: "Is it ok to inherit from vector?"
- Next in thread: Gianni Mariani: "Re: Is it ok to inherit from vector?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|