Hello. I make my map implementation, and such a construction does not allow the project to compile.

void traverse(node<key, value> p, list<node<key, value>> &l) { ... } 

The error is this:

Error C2061 syntax error: identifier "list"

list is standard, from the stl library.

Put spaces among the brackets, nothing helps.

  • one
    And if std::list ? - Qwertiy
  • one
    Either they did not connect to #include <list> or they did not add using namespace std; . - Vladimir Gamalyan
  • In GCC, for example, the roof goes from >> in the template concretization, it is necessary to break the spaces. - gbg
  • @gbg is not a gcc thing. Spaceless << and >> are allowed in templates starting from C ++ 11. Probably the studio version of the vehicle does not support C ++ 11. And we really need spaces. Well, or the rest, already expressed, versions have a place to be. - αλεχολυτ

0