Why does the following code generate a compilation error?
Edit: My source code was not clear - I split the code into separate files ...
First.h
class First { public: static const char* TEST[]; public: First(); };
First.cpp
const char* First::TEST[] = {"1234", "5678"}; First::First() { uint32_t len = sizeof(TEST);
Sizing in the First class seems fine, however ...
Second.h
class Second { public: Second(); };
Second.cpp
#include "First.h" Second::Second() { uint32_t len = sizeof(First::TEST);
I get the following error: 'const char *[]': illegal sizeof operand
source share