Possible Duplicate:
Where and why do I have to put the “template” and “typename” keywords?
#include <iostream>
using namespace std;
template <class T>
class Test
{
union obj
{
union obj* next;
int num;
};
static const int SZ=3;
static obj* volatile list[SZ];
};
template <class T>
Test<T>::obj* volatile
Test<T>::list[SZ]=
{
0, 0, 0
};
int main()
{
return 0;
}
With g++, the error I get is:
18|error: expected constructor, destructor, or type conversion before '*' token