开发者

Link error in DevC++ not in codepad.org

开发者 https://www.devze.com 2023-01-06 12:40 出处:网络
I am learning C++ and need some help with compile error messages. I have some code... http://codepad.org/ncGTYWew.

I am learning C++ and need some help with compile error messages. I have some code... http://codepad.org/ncGTYWew.

When I compile in DevC++, I get this output: 22 C:\D开发者_运维百科ev-Cpp\Program Files\linkedListType.h template-id operator<< <>' forstd::basic_ostream >& operator<<(std::basic_ostream >&, const linkedListType&)' does not match any template declaration

In codepad it seems to compile fine. Prior to this compile, both codepad and DevC++ requested I insert '<>' after the operator<< declaration in Line 22.

Can someone explain why DevC++ does not recognize the template? Did I put the '<>' in the wrong spot? Why would codepad not have a problem with it?

Thank you kindly.


I recommend you to use code::blocks instead of dev-cpp; five years ago that do not update and the new standard 0xC++ I believe that neither supports it.

0

精彩评论

暂无评论...
验证码 换一张
取 消