[ Post New Message | Post Reply to this One | Send Private Email to Joe Wiggins | Help ]

Running "Who's Afraid of C++?" code on Visual C++ program

from Joe Wiggins (jwiggins@erols.com)
I'm running Visual C++ version 5.0 on Windows98.

In trying to run the program basic02.cc (p. 85, Who's Afraid of C++? 1st edition), I receive the following compile errors:

Compiling... basic02.cpp Linking... basic02.obj : error LNK2001: unresolved external symbol "public: __thiscall string::~string(void)" (??1string@@QAE@XZ) basic02.obj : error LNK2001: unresolved external symbol "class ostream & __cdecl operator<<(class ostream &,class string const &)" (??6@YAAAVostream@@AAV0@ABVstring@@@Z) basic02.obj : error LNK2001: unresolved external symbol "class istream & __cdecl operator>>(class istream &,class string &)" (??5@YAAAVistream@@AAV0@AAVstring@@@Z) basic02.obj : error LNK2001: unresolved external symbol "public: __thiscall string::string(void)" (??0string@@QAE@XZ) Debug/basic02.exe : fatal error LNK1120: 4 unresolved externals Error executing link.exe.

basic02.exe - 5 error(s), 0 warning(s)

I've placed the "string6.h" header file in the same file with the rest of the source code and other files.

Is there an easy fix so that not only this program, but the remaining code in Who's Afraid of C++?, will run on Visual C++? Thx!

P.S. Great book!

(posted 9112 days ago)

[ Previous | Next ]