Z
zhi.wong
The following code is a simplification of a example in "The C++
programming language". So, it is assumed to be STANDARD c++. But Visual
C++ 2003 complains about the function defination of get_free. Is M$
VC2003 reaaly standard in this regard?
template<class T> class MyList {
private:
struct Link {
T val;
Link *next;
};
Link* free;
Link* get_free ();
public:
void insert (T);
}
template<class T> void MyList<T>::insert (T value)
{
return;
}
template<class T>MyList<T>::Link *MyList<T>::get_free ()
{
return NULL;
}
programming language". So, it is assumed to be STANDARD c++. But Visual
C++ 2003 complains about the function defination of get_free. Is M$
VC2003 reaaly standard in this regard?
template<class T> class MyList {
private:
struct Link {
T val;
Link *next;
};
Link* free;
Link* get_free ();
public:
void insert (T);
}
template<class T> void MyList<T>::insert (T value)
{
return;
}
template<class T>MyList<T>::Link *MyList<T>::get_free ()
{
return NULL;
}