fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. using namespace std;
  5.  
  6. struct Data
  7. {
  8. int a = 7;
  9. };
  10.  
  11.  
  12. int main() {
  13. // your code goes here
  14.  
  15. Data elem;
  16.  
  17. std::vector<Data> v;
  18.  
  19.  
  20. v.emplace_back(elem);
  21.  
  22. std::cout << elem.a << std::endl;
  23.  
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5292KB
stdin
Standard input is empty
stdout
7