【发布时间】:2012-11-22 00:13:15
【问题描述】:
可能重复:
Where and why do I have to put the “template” and “typename” keywords?
declaring a C++ set iterator
我正在尝试在 Linux 系统中编译 C++ 一些代码,这些代码在 Windows 中运行良好。
我遇到了很多类似以下的错误:
code:
..
39 set<Node<T>*>::iterator child;
...
g++ 给了我错误:
Node.h:39: error: expected ‘;’ before ‘child’
这只是一个例子。你能给我一些解决方法的提示吗?
【问题讨论】:
-
可能是编码或windows换行问题