please download the VC++ express 2008 project attached.
it has linker errors. please help me solve the problem.

Member Avatar for iamthwee

What the hell is that even supposed to do?

nothing!
I have deleted almost every thing.
after I added the template function val(), the linker errors appeared.
I only want to know why I receive a linker error.

the error:

Error 1 error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl val<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$val@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV01@@Z) referenced in function "public: void __thiscall BaseList::Add(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?Add@BaseList@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) list.obj

try adding the following code in the very beginning.

#include <string>
using std::string;

this is the solution I can suggest without looking at the .zip file :)
Hope this helps.
Good luck.

but that does not solve the problem.
not bad if you download & look at the code!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.