OK, I made a .cpp file (no header) that contains an ADT and I also made another .cpp file that contains a driver program for the ADT. Both files compile fine separately with no warnings nor errors. However, when I try to Debug build the project I get this:
--------------------Configuration: QueType - Win32 Debug--------------------
Compiling...
QueType.cpp
QueTypeDriver.cpp
Linking...
QueTypeDriver.obj : error LNK2005: "public: __thiscall QueType::QueType(void)" (??0QueType@@QAE@XZ) already defined in QueType.obj
QueTypeDriver.obj : error LNK2005: "public: void __thiscall QueType::MakeEmpty(void)" (?MakeEmpty@QueType@@QAEXXZ) already defined in QueType.obj
QueTypeDriver.obj : error LNK2005: "public: bool __thiscall QueType::IsEmpty(void)const " (?IsEmpty@QueType@@QBE_NXZ) already defined in QueType.obj
QueTypeDriver.obj : error LNK2005: "public: bool __thiscall QueType::IsFull(void)const " (?IsFull@QueType@@QBE_NXZ) already defined in QueType.obj
QueTypeDriver.obj : error LNK2005: "public: int __thiscall QueType::Items(void)const " (?Items@QueType@@QBEHXZ) already defined in QueType.obj
QueTypeDriver.obj : error LNK2005: "public: void __thiscall QueType::Enqueue(int)" (?Enqueue@QueType@@QAEXH@Z) already defined in QueType.obj
QueTypeDriver.obj : error LNK2005: "public: void __thiscall QueType:
equeue(int &)" (?Dequeue@QueType@@QAEXAAH@Z) already defined in QueType.obj
QueTypeDriver.obj : error LNK2005: "public: void __thiscall QueType:
rintQueue(class ostream &)" (?PrintQueue@QueType@@QAEXAAVostream@@@Z) already defined in QueType.obj
Debug/QueType.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
QueType.exe - 9 error(s), 0 warning(s)
And I have NO idea what that is. I think it is just something simple I forgot but I am rather inexperienced with Visual C++ (C++ in general) and a bit pressed for time. Please help!
--------------------Configuration: QueType - Win32 Debug--------------------
Compiling...
QueType.cpp
QueTypeDriver.cpp
Linking...
QueTypeDriver.obj : error LNK2005: "public: __thiscall QueType::QueType(void)" (??0QueType@@QAE@XZ) already defined in QueType.obj
QueTypeDriver.obj : error LNK2005: "public: void __thiscall QueType::MakeEmpty(void)" (?MakeEmpty@QueType@@QAEXXZ) already defined in QueType.obj
QueTypeDriver.obj : error LNK2005: "public: bool __thiscall QueType::IsEmpty(void)const " (?IsEmpty@QueType@@QBE_NXZ) already defined in QueType.obj
QueTypeDriver.obj : error LNK2005: "public: bool __thiscall QueType::IsFull(void)const " (?IsFull@QueType@@QBE_NXZ) already defined in QueType.obj
QueTypeDriver.obj : error LNK2005: "public: int __thiscall QueType::Items(void)const " (?Items@QueType@@QBEHXZ) already defined in QueType.obj
QueTypeDriver.obj : error LNK2005: "public: void __thiscall QueType::Enqueue(int)" (?Enqueue@QueType@@QAEXH@Z) already defined in QueType.obj
QueTypeDriver.obj : error LNK2005: "public: void __thiscall QueType:
QueTypeDriver.obj : error LNK2005: "public: void __thiscall QueType:
Debug/QueType.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
QueType.exe - 9 error(s), 0 warning(s)
And I have NO idea what that is. I think it is just something simple I forgot but I am rather inexperienced with Visual C++ (C++ in general) and a bit pressed for time. Please help!