2
C++ requires a type specifier for all declarations
  ...char, 16>>, MAXPreBorder> _preCloselist)

我的代码是:

std::tr1::unordered_set<std::tr1::array<unsigned char, 16> >
  dfs(Graphnode _root,
      std::tr1::array<unsigned char, 16> goal,
      unsigned char _totalDepth,
      queue<Graphnode> _preload1,
      queue<Graphnode> _preload2,
      std::tr1::array<
        std::tr1::unordered_set<std::tr1::array<unsigned char, 16>>, 
        MAXPreBorder> _preCloselist
     )

所以问题是这样的:

std::tr1::array<
  std::tr1::unordered_set<std::tr1::array<unsigned char, 16>>, 
  MAXPreBorder> _preCloselist

知道这是错的吗?

非常感谢!

4

1 回答 1

3

可能是你的编译器不喜欢>>in

std::tr1::unordered_set<std::tr1::array<unsigned char, 16>>

这只保证在 C++11 中有效。尝试

std::tr1::unordered_set<std::tr1::array<unsigned char, 16> >
于 2013-04-03T16:48:57.100 回答