fork download
  1. #include<iostream>
  2.  
  3. int main() {
  4. struct Foo {
  5. bool vin;
  6. bool bar[3];
  7. };
  8.  
  9. Foo baz = {true, true, false, true};
  10. Foo zoo = {false, {true, false, false}};
  11.  
  12. std::cout << baz.vin << "\t" << baz.bar[0] << "\t" << baz.bar[1] << "\t" << baz.bar[2] << "\n";
  13. std::cout << zoo.vin << "\t" << zoo.bar[0] << "\t" << zoo.bar[1] << "\t" << zoo.bar[2] << "\n";
  14. }
Success #stdin #stdout 0s 2928KB
stdin
Standard input is empty
stdout
1	1	0	1
0	1	0	0