Templates and classes
Could someone tell me why this code...
list.hh
Code:
#ifndef _LIST_HH
#define _LIST_HH
template <class T>
class list
{
private:
class node
{
T m_data;
node *m_prev;
node *m_next;
};
public:
list();
private:
node m_base;
node *m_head;
};
#endif // _LIST_HH
list.cc
Code:
#include "list.hh"
list::list()
: m_head(m_base)
{
}
gives this error...
list.cc:3: syntax error before `::' token
im using GNU C++ 3.2.2
theBUSH
The next line is not true.
The previous line is true.
There are only 10 kinds of people in the world, those who know binary, and those who dont.
There's no place like 127.0.0.1.