xiao schrieb:
> #include <string>
> #include <iostream>
> using namespace std;
> class HowEasy
> {
> public:
> HowEasy(); <---- declaration of the constructor.
> int pointVal(string param0);
> };
> void main()
> {
> string test="a simple test";
> HowEasy easy;
> int returnvalue;
> returnvalue=easy.pointVal(test);
> }
>
> When I compile the program using visual studio 2005, I got the
> following result
> test.obj : error LNK2019: unresolved external symbol "public:
> __thiscall HowEasy::HowEasy(void)" (??0HowEasy@[EMAIL PROTECTED]
) referenced in
> function _main
>
> Can somebody tell me why this program can not work?Thanks.
Because you declared the constructor (see above), but never defined it.
Greetings,
Thomas
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]