fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Point {
  5. public:
  6. double x = 0;
  7. double y = 0;
  8.  
  9. Point() { }
  10. };
  11.  
  12. int main() {
  13. Point p;
  14.  
  15. std::cout << "Point (x = " << p.x << ", y = " << p.y << ")" << std::endl;
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
Point (x = 0, y = 0)