Advertisement

template class

Started by January 08, 2003 03:17 PM
0 comments, last by Ego 21 years, 10 months ago
I''m trying template class, but i get these error messages trying to compile it in VC++ Anyone know what''s wrong? Main.obj : error LNK2001: unresolved external symbol "public: __thiscall List::~List(void)" (??1?$List@D@@QAE@XZ) Main.obj : error LNK2001: unresolved external symbol "public: __thiscall List::List(void)" (??0?$List@D@@QAE@XZ) The code... template List::List() { head = NULL; } template List::~List() { }
your definition for anything that gets templated must be visible to the current translation unit. in other words, put the definition into the .h file instead of a seperate .cpp file.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V

This topic is closed to new replies.

Advertisement