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