I recently was brushing up on my coding as I attend university for CS and the semester starts up in a week or two and I decided to try to fix this program that I could never figure out. I tried running it through Putty and got nowhere, as it would just segfault and would not allow me to debug (which I think has to do with the professor resetting the system for his class next semester). So, I copied all of my code into Visual Studio and began working on debugging. I think I'm almost there, but I'm stuck on this next group of errors. They seem to all be Linker errors of which I know nothing about. I checked to see if I made typos in the function signatures and none seem to stand out. I also made sure that I #included everything properly and everything seems to be linked properly to the best of my knowledge. The linking is a little weird because the program is supposed to be an implementation of an ADT that is both a binary tree and a queue at the same time. The Binary Nodes are the nodes of the tree and contain pointer members for the parent and the two children as well as an item member for the data, while the Nodes are the nodes of the queue and contain a pointer member to the corresponding Binary Node and a pointer member to the next node in the queue. If anyone could please help me out here I would greatly appreciate it. There are 13 errors and they all basically say the same thing, just different function calls referenced in different places in the code. I will provide one of the error messages below, as well as a zip file containing the entire project folder.
Error:
unresolved external symbol "public: class std::shared_ptr<class BinaryNode<int> > __thiscall BinaryNode<int>::getLeftChild(void)const " (?getLeftChild@?$BinaryNode@H@@QBE?AV?$shared_ptr@V?$BinaryNode@H@@@std@@XZ) referenced in function "void __cdecl printTree(class ValueTraversableQueue<int> const &)" (?printTree@@YAXABV?$ValueTraversableQueue@H@@@Z)
Link to Zip file download: http://ift.tt/2AS4fnL
Aucun commentaire:
Enregistrer un commentaire