我正在学习C++,需要一些编译错误消息的帮助。我有一些代码。http://codepad.org/ncGTYWew。
当我在DevC++中编译时,我得到这样的输出:22 C:\Dev-Cpp\Program Files\linkedListType.h template-id operator<< <>' forstd::basic_ostream >& operator<<(std::basic_ostream >&, const linkedListType&)' does not match any template declaration
在codepad中,它似乎编译得很好。在此编译之前,codepad和DevC++都要求我在第22行的operator<<声明后插入'<>‘。
有人能解释一下为什么DevC++不能识别模板吗?我是不是把'<>‘放错地方了?为什么codepad不会有问题呢?
非常感谢。
发布于 2010-07-10 22:15:40
我建议你使用代码::块,而不是五年前没有更新的dev-cpp;,我相信新的标准0xC++都不支持它。
https://stackoverflow.com/questions/3219482
复制相似问题