template

Joined
Nov 18, 2006
Messages
1
Reaction score
0
i have two header files
LinkedList.h
template <class Object>
class List
{....}
template <class Object>
class ListItr
{...}
template <class Object>
class ListNode
{...}

and other is Stack.h
template<class object>
class Stack
{...}

everything seems like ok but when i tired them in test.cpp like
#include "LinkedList.h"
#include "Stack.h"
#include <iostream>
using namespace st;
int main()
{
List<char> tes;
.....
}

it gives an error like and fot every function of List class
undefined reference to `List<char>::List()'

i dont know where i am wrong??:motz:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,073
Messages
2,570,539
Members
47,197
Latest member
NDTShavonn

Latest Threads

Top