fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. struct myStruct
  5. {
  6. std::vector<double> myVector;
  7. };
  8.  
  9. int main()
  10. {
  11. myStruct m { std::vector<double>(14, 0.5) };
  12. for (auto& d: m.myVector) std::cout << d << '\n';
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 3028KB
stdin
Standard input is empty
stdout
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5