12345678910111213141516171819202122232425
#include <iostream> #include <vector> template <typename S> std::ostream& operator<<(std::ostream& os, const std::vector<S>& std::vector) { // Printing all the elements // using << for (auto element : std::vector) { os << element << " "; } return os; } // Driver Code int main() { // vector containing integer elements std::vector<int> A = { 10, 20, 30, 40, 50, 60 }; std::cout << A << std::endl; return 0; }