-
apstring prob
does anyone know what might cause this problem:
--------------------Configuration: TAB_EDIT - Win32 Debug--------------------
Linking...
MAIN.OBJ : error LNK2001: unresolved external symbol "public: __thiscall apstring::~apstring(void)" (??1apstring@@QAE@XZ)
MAIN.OBJ : error LNK2001: unresolved external symbol "class istream & __cdecl operator>>(class istream &,class apstring &)" (??5@YAAAVistream@@AAV0@AAVapstring@@@Z)
MAIN.OBJ : error LNK2001: unresolved external symbol "public: __thiscall apstring::apstring(void)" (??0apstring@@QAE@XZ)
Debug/TAB_EDIT.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
...it compiles with no errors but i get that^ when i try and run it. help please!!!!
-
apstring's constructor, destructor and the operator function
Code:
class istream & __cdecl operator>>(class istream &,class apstring &)
have no function bodys. That means, the compiler knows that the function exists because it's been declarared, but he didn't compile the implementation.
1. Check if you have those 3 functions implemented
2. Check if you have included the cpp file of apstring in you project (and campiled as well)
3. Check if they are named correcty (with all necessary namespaces, ect.)
example for declaration:
Code:
istream& operator>>(class istream&, class apstring&);
example for implementation:
Code:
istream& operator>>(class istream& in, class apstring& apstr)
{
// whatever apstring does
return in;
}
Btw, the { } braces + stuff within them is called the functions body (or, if they belong to a class, the class body).
-
To the OP. Please dont post under that name again. Its against board rules and if I notice you doing it again, I will delete your posts