Template question

Hi everyone,

I have two questions about the use of a template declaration.
This is the code:

1
2
3
4
5
6
7
8
9
10
11
using namespace std;
template <typename DataType>

class Graph
{
    public:
    DataType Data(int k) const; 

    private: 
{;


First question: What is the meaning of template <typename DataType> ??
Second question: In the class Graph this DataType is used to define Data(int k) const; What is the meaning of this?
someone an idea??
closed account (z05DSL3A)
http://www.cplusplus.com/doc/tutorial/templates.html
Topic archived. No new replies allowed.