Im trying to write a template member function but something goes wrong. I get this compiler error:

error C2275: "MY_STRUCT" : illegal use of this type as an expression

Can anybody help me?

////////////////////////////////////////////////////////////////////////
// MyClass.h

typedef struct
{
int n;
long l;
} MY_STRUCT;

class MyClass
{
public:
template <typename T> int GetSizeOf(T myStruct);
MyClass();
virtual ~MyClass();
};
///////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////
// MyClass.cpp

MyClass::MyClass()
{
}

MyClass::~MyClass()
{
}

template <typename T> int MyClass::GetSizeOf(T myStruct)
{
return sizeof(T);
}
////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////
// Main.cpp

void main ()
{
MyClass TestObj;
MY_STRUCT myStruct;

int nSize = TestObj.GetSizeOf<MY_STRUCT>(myStruct);

return;
}