Hi forum,
I am running into an issue that is not allowing me to compile my program. I get external symbol errors and "multiply defined symbols found." I am not sure why this is happening, but any help would be much appreciated.. Im going to post all of my code, and all 5 errors, so it'd be easier to CTRL+F/copy/paste for something specific. Im just looking for some sort of direction, because everything is going well, and then boom, I have no idea where I am and what to do.I was thinking of using FORCE:[MULTIPLE|UNRESOLVED], but G++ will complain upon submission.
The 4 errors are:
1.
LNK2005: "class std::basic_istream<char,struct std::char_traits<char> > & __cdecl sict::operator>>(class std::basic_istream<char,struct std::char_traits<char> > &,class sict::Product &)" (??5sict@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@std@@AAV12@AAVProduct@0@@Z) already defined in MyProduct.obj
2.
LNK2005: "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl sict::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class sict::Product const &)" (??6sict@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV12@ABVProduct@0@@Z) already defined in MyProduct.obj
3.
LNK2005: "double __cdecl sict::operator+=(double &,class sict::Product const &)" (??Ysict@@YANAANABVProduct@0@@Z) already defined in MyProduct.obj
4. LNK2005: "class sict::Product * __cdecl sict::CreateProduct(void)" (?CreateProduct@sict@@YAPAVProduct@1@XZ) already defined in MyProduct.obj
//
And the code: (if there's anything missing, please let me know)
http://cpp.sh/36mhi