fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class C {
  5. public:
  6. int x;
  7. };
  8.  
  9. int main() {
  10. C c = C();
  11. C *p = &c;
  12.  
  13. cout << c.x << " " << (*p).x << '\n';
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5388KB
stdin
Standard input is empty
stdout
0 0