Search code examples
c++linkerunresolved-external

getting an error during overloading the operations


SOLVED

I'm writing a code for making Set by linked lists in C++ with visual C++ 2010. when I want to overload the operations I get this Error

1>test.obj : error LNK2019: unresolved external symbol "public: __thiscall MySet::MySet(class MySet const &)" (??0MySet@@QAE@ABV0@@Z) referenced in function "public: class MySet __thiscall MySet::operator=(class MySet)" (??4MySet@@QAE?AV0@V0@@Z)

please help me. how should I get read of this error


Solution

  • Have you declared and defined the following constructor method?

    MySet::MySet(const MySet &other)
    {
        ....
    }