fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3. #include <iterator>
  4. using std::vector;
  5. using std::ostream_iterator;
  6. using std::copy;
  7. using std::cout;
  8. using std::endl;
  9.  
  10. void foo(const vector<int>& a)
  11. {
  12. ostream_iterator<int> out_it (std::cout,", ");
  13. copy ( begin(a), end(a), out_it );
  14. cout << endl;
  15. }
  16.  
  17. int main()
  18. {
  19. foo({4,5,6});
  20. return 0;
  21. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
4, 5, 6,