fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Foo
  5. {
  6. int a;
  7. double b;
  8. char *c;
  9. };
  10.  
  11. int main()
  12. {
  13. Foo foo{
  14. a:1,
  15. b:2,
  16. c:"test"
  17. };
  18.  
  19. cout
  20. << foo.a << ", "
  21. << foo.b << ", "
  22. << foo.c << endl;
  23. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
1, 2, test