Iterating through std::list

Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2009
Posts: 1
Reputation: ellla is an unknown quantity at this point 
Solved Threads: 0
ellla ellla is offline Offline
Newbie Poster

Re: typedef statement - easy one

 
-1
  #1
Aug 27th, 2009
typedef std::list<list*> List;

Can you tell me how to enter inside the list,if I want to know number of contacts which it consists..
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 360
Reputation: jencas is just really nice jencas is just really nice jencas is just really nice jencas is just really nice jencas is just really nice 
Solved Threads: 69
jencas jencas is offline Offline
Posting Whiz

Re: typedef statement - easy one

 
0
  #2
Aug 28th, 2009
Originally Posted by ellla View Post
typedef std::list<list*> List;

Can you tell me how to enter inside the list,if I want to know number of contacts which it consists..
What is the second list in
  1. typedef std::list<list*> List;

or do you mean

  1. typedef std::list<std::list*> List;
If you are forced to reinvent the wheel at least try to invent a better one!

Please use code tags - Please mark solved threads as solved
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 1,459
Reputation: firstPerson is just really nice firstPerson is just really nice firstPerson is just really nice firstPerson is just really nice firstPerson is just really nice 
Solved Threads: 189
firstPerson's Avatar
firstPerson firstPerson is offline Offline
Nearly a Posting Virtuoso

Re: Iterating through std::list

 
0
  #3
Aug 28th, 2009
Use iterator provided by list.
Last edited by firstPerson; Aug 28th, 2009 at 12:34 pm.
1) Prove that the area of a circle is pi*r^2, where "r" is the radius of the circle.
2) Problem 2[b]solved by : jonsca
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 258 | Replies: 2
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC