#include <iostream> using namespace std; class Test { int *ptr = NULL; }; int main() { Test t; return 0; }
Standard input is empty
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*'
Standard output is empty