fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class TestClass
  5. {
  6. public:
  7. static const unsigned char PREDEFINED_ARRAY_1[] = {0x1, 0x2, 0x3};
  8. };
  9.  
  10. int main() {
  11. // your code goes here
  12. return 0;
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:7:52: error: a brace-enclosed initializer is not allowed here before ‘{’ token
  static const unsigned char PREDEFINED_ARRAY_1[] = {0x1, 0x2, 0x3};
                                                    ^
prog.cpp:7:66: error: invalid in-class initialization of static data member of non-integral type ‘const unsigned char []’
  static const unsigned char PREDEFINED_ARRAY_1[] = {0x1, 0x2, 0x3};
                                                                  ^
stdout
Standard output is empty