Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Class Woes

Status
Not open for further replies.

SkyRender

Programmer
Joined
Apr 25, 2005
Messages
3
Location
US
This is a simple question. I'm trying to define a list of lists (of type string) in Visual C++. My declaration looks like this:

list<list<string>> my_list;

The compiler doesn't like my declaration. Am I missing something? Does this need to be a list pointer?
 
Code:
list<list<string[COLOR=red]>>[/color] my_list;
The token scanner sees that as a right-shift operator. Put a space between them instead:
Code:
list<list<string> > my_list;

Yeah, it's stupid. I think I read that it might get changed in a future version of the C++ Standard.
 
Thanks for your help! My code works great now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top