Skip to main content
gamedev.net
🔒 Locked

compiler problems

Started by EODCyismARDEM 2 replies 400+ views
Original Post
EODCyismARDEM
EODCyismARDEM
I'm trying to do a list inside a vector, but I get compiler errors. In fact whenever I use a templated class as the type for another templated class, I get compiler problems. For instance:
std::list<std::list<int>> blah;

doesn't seem to work, I get the errors:
error C2146: syntax error : missing ',' before identifier 'blah'
error C2065: 'blah' : undeclared identifier
error C2143: syntax error : missing '>' before ';'
 
Fixing your formatting -fel [edited by - felisandria on April 30, 2004 5:58:29 PM]
~EODCyismARDEM
felisandria
felisandria
The problem is that

>>

is an operator in its own right. Try putting a space in, like this:

<std::list<std::list<int> > blah;

because right now it thinks you're trying to um, bitshift half a template declaration to the right, or something.

Sorry about the massive source blocks but otherwise the little pointy thingies try to get html-interpreted and it's a mess.

-fel

[edited by - felisandria on April 30, 2004 6:06:34 PM]
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.