fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class X
  5. {
  6. private:
  7. int private_data;
  8. public:
  9. static void func_wrapper(X *x)
  10. {
  11. cout << x->private_data << endl;
  12. }
  13. X():private_data(5){}
  14. };
  15.  
  16. int main()
  17. {
  18. X temp;
  19. X::func_wrapper(&temp);
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 2928KB
stdin
Standard input is empty
stdout
5