Archived

This topic is now archived and is closed to further replies.

Dwiel

templates of templates...

Recommended Posts

Hello, I was wondering why
  
vector<vector<int>> ppint;
  
doesn't work, but
  
typedef vector<int> vectorint;
vector<vectorint> ppint;
  
does? Is this a problem with the vector class that I coded, or is this how all template classes work? Thanx a lot! "The only thing worse than not having that new _______ , is when some rich kid has it, but can't and/or doesn't appreciate it."-me Tazzel3d ~ Dwiel [edited by - tazzel3d on January 19, 2003 2:50:53 PM]

Share this post


Link to post
Share on other sites
To answer the original question, you just need to insert spaces to resolve some syntax ambiguity:

  
vector<vector<int>> ppint; // won''t work: The closing >> is misinterpreted as operator>>


vector<vector<int> > ppint; // will work

Share this post


Link to post
Share on other sites