0

Hello,

I am getting a linking error, and I'm not sure what its referring to.

Here is the error

1>Main.obj : error LNK2019: unresolved external symbol "public: void __thiscall BinaryHeap,class std::allocator > >,class Comp,class std::allocator > > >::insert(class Item,class std::allocator > > const &)" (?insert@?$BinaryHeap@V?$Item@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@V?$Comp@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@@@QAEXABV?$Item@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@@Z) referenced in function "public: void __thiscall PriorityQueue,class std::allocator > >::insertItem(int,class std::basic_string,class std::allocator > const &)" (?insertItem@?$PriorityQueue@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QAEXHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)

The code is rather long, however if you want me to post it I will.

thanks

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by karolik
0

Have you created your own template classes BinaryHeap and PriorityQueue?

What files are the code for those classes in? Have you included them into Main.cpp?

0

Thanks, I figured out the problem. I put them in a .cpp and .h instead of just a .h

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.