fork(12) download
  1. class Zlib_init
  2. {
  3. Zlib_init() ; //get Zlib ready for use
  4. ~Zlib_init() ; //clean up after Zlib
  5. public:
  6. int j;
  7. };
  8. class Zlib
  9. {
  10. public:
  11. static Zlib_init x;
  12. };
  13.  
  14. Zlib_init Zlib::x;
  15.  
  16. int main()
  17. {
  18. Zlib::x.j = 10;
  19.  
  20. return 0;
  21. }
  22.  
  23.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3: error: ‘Zlib_init::Zlib_init()’ is private
prog.cpp:14: error: within this context
prog.cpp: In static member function ‘static void Zlib::__static_initialization_and_destruction_0(int, int)’:
prog.cpp:4: error: ‘Zlib_init::~Zlib_init()’ is private
prog.cpp:14: error: within this context
stdout
Standard output is empty