fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. void func(std::vector<int> &b){
  6. for (auto i : b)
  7. std::cout<<i<<"\n";}
  8.  
  9. int main() {
  10. std::vector<int> a;
  11. a.push_back(1);
  12. a.push_back(1);
  13. func(a);
  14. }
Success #stdin #stdout 0s 5284KB
stdin
3
1 2
1 5
1 3
stdout
1
1