Hello!
I have the following problem.
I declare in someClass.hpp file some class with static members:
1 2 3 4 5 6 7
class A
{
...
public:
staticint arr[];
...
};
Then, in someclass.cpp define static members:
int A::arr[] = {1,2,3,4};
When I try to get the size of it in someOtherFile.cpp:
1 2 3 4 5
void somefunc()
{
size_t s = sizeof(A::arr);
...
}
I get error message "incomplete type is not allowed".
So, the question is: what am i doing wrong? How can i acquire the size of array in other .cpp file?