0

Hi everyone. Getting compile errors with the following code that i can not figure out...:

```
template <class T>
class X{
class Y{
public:
Y();
};
X();
};
template <class T>
typename X<T>::Y * operator[](X<T> * obj1, int index);
```

The compile error from mingw is:

`test.h:18: error: 'typename X<T>::Y * operator[](X<T> * obj1, int index);' must be a nonstatic member function`

Can anyone explain why this doesn't compile and if/how I can get round the problem? Thanks