Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #11988
| From | jgk@panix.com (Joe keane) |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Is this bad? (How can this be avoided?) |
| Date | 2011-11-30 17:43 +0000 |
| Organization | Public Access Networks Corp. |
| Message-ID | <jb5pvm$prk$1@reader1.panix.com> (permalink) |
| References | <52997172-c9ca-4e1b-aad0-98fc277268a8@g1g2000pri.googlegroups.com> |
In article <52997172-c9ca-4e1b-aad0-98fc277268a8@g1g2000pri.googlegroups.com>,
mike3 <mike4ty4@yahoo.com> wrote:
>class Drawing {
> private:
> ... blah ...
> std::vector<Shape *> shapeList;
> ... blah ...
> public:
> ... blah ...
> void addShape(Shape *s)
> {
> shapeList.push_back(s);
> }
> ... blah ...
> void doSmth(); // uses the objects in shapeList somehow
> ... blah ...
>};
Maybe you want
std::vector<Shape> shapeList;
instead?
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is this bad? (How can this be avoided?) mike3 <mike4ty4@yahoo.com> - 2011-11-28 13:44 -0800
Re: Is this bad? (How can this be avoided?) Leigh Johnston <leigh@i42.co.uk> - 2011-11-28 22:16 +0000
Re: Is this bad? (How can this be avoided?) mike3 <mike4ty4@yahoo.com> - 2011-11-28 15:16 -0800
Re: Is this bad? (How can this be avoided?) Ian Collins <ian-news@hotmail.com> - 2011-11-29 13:04 +1300
Re: Is this bad? (How can this be avoided?) mike3 <mike4ty4@yahoo.com> - 2011-11-28 17:17 -0800
Re: Is this bad? (How can this be avoided?) Ian Collins <ian-news@hotmail.com> - 2011-11-29 14:28 +1300
Re: Is this bad? (How can this be avoided?) "MikeWhy" <boat042-nospam@yahoo.com> - 2011-11-28 19:17 -0600
Re: Is this bad? (How can this be avoided?) Leigh Johnston <leigh@i42.co.uk> - 2011-11-29 14:12 +0000
Re: Is this bad? (How can this be avoided?) Goran <goran.pusic@gmail.com> - 2011-11-29 00:06 -0800
Re: Is this bad? (How can this be avoided?) jgk@panix.com (Joe keane) - 2011-11-30 17:43 +0000
Re: Is this bad? (How can this be avoided?) "MikeWhy" <boat042-nospam@yahoo.com> - 2011-11-30 12:26 -0600
Re: Is this bad? (How can this be avoided?) jgk@panix.com (Joe keane) - 2011-11-30 20:36 +0000
Re: Is this bad? (How can this be avoided?) Leigh Johnston <leigh@i42.co.uk> - 2011-11-30 18:26 +0000
csiph-web