Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 11th, 2006, 09:15 PM
yinglcs@gmail.com
Guest
 
Posts: n/a
Default Create a list of list in Stl

Hi,

How can I create a list of list in STL?
I try list < list <A*> >, but that does not work, I get compiler
errors.

  #2  
Old January 11th, 2006, 09:25 PM
Victor Bazarov
Guest
 
Posts: n/a
Default Re: Create a list of list in Stl

yinglcs@gmail.com wrote:[color=blue]
> How can I create a list of list in STL?
> I try list < list <A*> >, but that does not work, I get compiler
> errors.
>[/color]

FAQ 5.8

V
  #3  
Old January 11th, 2006, 09:25 PM
yinglcs@gmail.com
Guest
 
Posts: n/a
Default Re: Create a list of list in Stl

Sorry. My mistake.

  #4  
Old January 11th, 2006, 09:35 PM
yinglcs@gmail.com
Guest
 
Posts: n/a
Default Re: Create a list of list in Stl

When I do this:
A a1;
list<A> alist;
alist.push_back(a1);

does that mean I put a Copy of 'a1' to the list, alist?

So if I do this:

list < list <A> > alistOfList;

alistOfList.push_back(alist);

I put a copy of 'alist' to the alistOfList?

  #5  
Old January 11th, 2006, 09:55 PM
Victor Bazarov
Guest
 
Posts: n/a
Default Re: Create a list of list in Stl

yinglcs@gmail.com wrote:[color=blue]
> When I do this:
> A a1;
> list<A> alist;
> alist.push_back(a1);
>
> does that mean I put a Copy of 'a1' to the list, alist?[/color]

Yes.
[color=blue]
> So if I do this:
>
> list < list <A> > alistOfList;
>
> alistOfList.push_back(alist);
>
> I put a copy of 'alist' to the alistOfList?[/color]

Yes.

What book on C++ are you reading that you have to ask such basic
questions?

V
  #6  
Old January 11th, 2006, 09:55 PM
MathGis
Guest
 
Posts: n/a
Default Re: Create a list of list in Stl

Yes

  #7  
Old January 11th, 2006, 09:55 PM
MathGis
Guest
 
Posts: n/a
Default Re: Create a list of list in Stl

Yes

  #8  
Old January 11th, 2006, 09:55 PM
MathGis
Guest
 
Posts: n/a
Default Re: Create a list of list in Stl

Yes

  #9  
Old January 11th, 2006, 10:45 PM
JustBoo
Guest
 
Posts: n/a
Default Re: Create a list of list in Stl

On 11 Jan 2006 13:41:59 -0800, "MathGis" <mhilferink@objectvision.nl>
wrote:[color=blue]
>Yes
>Yes
>Yes
>Yes
>Yes
>Yes[/color]

Yes!
For gawd-sakes you relentless bastard!

YES, I CAN HEAR YOU NOW!

Sorry, could not resist.

No excellent soul is exempt from a mixture of madness.
- Aristotle
  #10  
Old January 11th, 2006, 10:45 PM
Default User
Guest
 
Posts: n/a
Default Re: Create a list of list in Stl

MathGis wrote:
[color=blue]
> Yes[/color]

That's nice.



Brian

--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles