fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <ostream>
  4. #include <iterator>
  5.  
  6. int main() {
  7. std::vector<int> v{1,2,3,4,5};
  8. std::copy(v.begin(), v.end(),
  9. std::ostream_iterator<int>(std::cout, " - "));
  10. return 0;
  11. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
1 - 2 - 3 - 4 - 5 -