Apr 25, 2005 #1 SkyRender Programmer Apr 25, 2005 3 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?
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?
Apr 25, 2005 #2 chipperMDW Programmer Mar 24, 2002 1,268 US 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. Upvote 0 Downvote
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.
Apr 25, 2005 Thread starter #3 SkyRender Programmer Apr 25, 2005 3 US Thanks for your help! My code works great now. Upvote 0 Downvote