I have a class, MyClass which contains:
typedef struct MyStruct
{
MyType * pmyTypes[14];
MyStruct()
{
pmyTypes = NULL;
}
} MyStruct;
I want to at compile time create an array of the same number of elements.
I've tried:
sizeof(MyClass::MyStruct.pmyTypes) / sizeof(MyClass::MyStruct.pmyTypes[0])
but I get a compiler error:
s:\mytest.h(155) : error C2143: syntax error : missing ')' before '.'
and I notice that when typing the '.' I don't get the list of elements in the
structure, even though I have included the file with the class definition
before I do this. Any idea where I'm going wrong this time? :-) Thanks!