fork download
  1. #include <iostream>
  2. using namespace std;
  3. #include <bits/stdc++.h>
  4. struct temp
  5. {
  6. int a;
  7. int b;
  8. temp (int a, int b)
  9. {
  10. this->a = a;
  11. this->b = b;
  12. }
  13. };
  14. int main() {
  15. vector<temp> v;
  16. v.emplace_back(1,2);
  17. v.emplace_back(3,4);
  18. for (auto it = v.begin(); it < v.end(); it++)
  19. {
  20. cout<<it->a<<" "<<it->b<<endl;
  21. }
  22. // your code goes here
  23. return 0;
  24. }
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
1 2
3 4