fork download
  1. #include <iterator>
  2. #include <iostream>
  3. #include <string>
  4. #include <vector>
  5. #include <algorithm>
  6.  
  7. template<typename T>
  8. std::ostream &operator <<(std::ostream &os, const std::vector<T> &v) {
  9. using namespace std;
  10. for(size_t i = 0; i < v.size(); ++i)
  11. {
  12. os << v[i] << "\n";
  13. }
  14. // copy(v.begin(), v.end(), ostream_iterator<T>(os, "\n"));
  15. return os;
  16. }
  17.  
  18. int main() {
  19. using namespace std;
  20. vector<string> v1;
  21. cout << v1;
  22. vector<vector<string> > v2;
  23. cout << v2;
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0.01s 2720KB
stdin
Standard input is empty
stdout
Standard output is empty