fork(5) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct A {
  5. int a;
  6. int b;
  7. int get_a() {return a;}
  8. };
  9.  
  10. int main() {
  11. A a1({4,5});
  12. A a2{1,2};
  13. cout << a1.a << '\n';
  14. cout << a2.b << '\n';
  15. return 0;
  16. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
4
2