fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Test {
  5. int *ptr = NULL;
  6. };
  7.  
  8. int main() {
  9. Test t;
  10. return 0;
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:5: error: ISO C++ forbids initialization of member 'ptr'
prog.cpp:5: error: making 'ptr' static
prog.cpp:5: error: invalid in-class initialization of static data member of non-integral type 'int*'
stdout
Standard output is empty