ARRAYSIZE
is a macro. That's why you get the error. The following code will give the same error:
class Test
{
public:
Test() : ARRAYSIZE(0)
{
}
short ARRAYSIZE;
};
You can fix this by either renaming
ARRAYSIZE
to something else, maybe
ARRSIZE
?
Or doing this before the class definition:
#undef ARRAYSIZE
[Update]
~~~~~~~~~
In response to your comment, here's how
ARRAYSIZE
is used.
int test[100];
cout << ARRAYSIZE(test) << endl;
That will print 100.