I have a template Graph class which uses an adjacency matrix (array of singly linked lists).
I need to be able to initialize the Graph with a size.
I guess it is done this way?
template <class T, int SIZE>
class Graph {
}
My problem is with member functions.
How do I declare a member function such as:
template <class T>
bool Graph<T, size>::AddVertex(T Data) {
}
the <T, size> above does not work. Also, do I need to do something like enum { size=SIZE }; within the class definition to be able to use the size argument in various member functions?
Thanks.