Thread: Linked List
View Single Post
Old Jan 22nd, 2006, 8:17 AM   #1
-=PARADOX=-
Programmer
 
-=PARADOX=-'s Avatar
 
Join Date: Oct 2005
Location: Portugal
Posts: 53
Rep Power: 3 -=PARADOX=- is on a distinguished road
Linked List

Hi there,

I'm trying to make a linked list with templates

LinkedList.h
template <class Tipo>
class CLinkedList
{
	template <class Tipo>
	class No
	{
	public:
		const Tipo *p;
		No<Tipo> *next;
	};
	No<Tipo> *top;
	No<Tipo> *tail;
public:
	CLinkedList(void);
	virtual ~CLinkedList(void);
	virtual void add(const Tipo &);
	virtual bool remove(const Tipo &);
	virtual void showAll();
};
When I compile it it gives me the following errors:
error LNK2019: unresolved external symbol "public: virtual __thiscall CLinkedList<int>::~CLinkedList<int>(void)" (??1?$CLinkedList@H@@UAE@XZ) referenced in function _main

error LNK2019: unresolved external symbol "public: virtual void __thiscall CLinkedList<int>::showAll(void)" (?showAll@?$CLinkedList@H@@UAEXXZ) referenced in function _main

error LNK2019: unresolved external symbol "public: __thiscall CLinkedList<int>::CLinkedList<int>(void)" (??0?$CLinkedList@H@@QAE@XZ) referenced in function _main

Can someone help me with this?

thanks
-=PARADOX=- is offline   Reply With Quote