Hi,
when I compile my code in Microsoft VC++6.0 I don't get any errors, but when I try to BUILD I get the link error LNK2005 multiple times. Does anyone know what could be wrong.
thank you
Compiling...
binarytree.cpp
main.cpp
Linking...
main.obj : error LNK2005: "public: void __thiscall Btree::add(int)" (?add@Btree@@QAEXH@Z) already defined in binarytree.obj
main.obj : error LNK2005: "public: void __thiscall Btree::addin(class Bnode *,int)" (?addin@Btree@@QAEXPAVBnode@@H@Z) already defined in binarytree.obj
main.obj : error LNK2005: "public: void __thiscall Btree:
rint(void)" (?print@Btree@@QAEXXZ) already defined in binarytree.obj
main.obj : error LNK2005: "public: void __thiscall Btree::display(class Bnode *)" (?display@Btree@@QAEXPAVBnode@@@Z) already defined in binarytree.obj
Debug/Program.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
Program.exe - 5 error(s), 0 warning(s)
when I compile my code in Microsoft VC++6.0 I don't get any errors, but when I try to BUILD I get the link error LNK2005 multiple times. Does anyone know what could be wrong.
thank you
Compiling...
binarytree.cpp
main.cpp
Linking...
main.obj : error LNK2005: "public: void __thiscall Btree::add(int)" (?add@Btree@@QAEXH@Z) already defined in binarytree.obj
main.obj : error LNK2005: "public: void __thiscall Btree::addin(class Bnode *,int)" (?addin@Btree@@QAEXPAVBnode@@H@Z) already defined in binarytree.obj
main.obj : error LNK2005: "public: void __thiscall Btree:
main.obj : error LNK2005: "public: void __thiscall Btree::display(class Bnode *)" (?display@Btree@@QAEXPAVBnode@@@Z) already defined in binarytree.obj
Debug/Program.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
Program.exe - 5 error(s), 0 warning(s)