Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <vector>
- using namespace std;
- ostream& operator<<(ostream& cout, vector<int>& myVector) {
- cout << '(';
- for (int i = 0; i < myVector.size(); ++i) {
- cout << myVector[i] << ' ';
- }
- cout << ')';
- return cout;
- }
- int main() {
- vector<int> myVector = {1, 2, 3, 4, 5};
- cout << myVector << ' ' << "hello";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement