theBUSH
April 5th, 2003, 10:02 PM
Could someone tell me why this code...
list.hh
#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
#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
list.hh
#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
#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