Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- using namespace std;
- template<typename type>
- ostream& operator<< (ostream& out, const vector<type>kunteynir){
- bool first_ap = true;
- for(const auto& kun: kunteynir){
- if(!first_ap){
- out << ", ";
- }
- first_ap = false;
- out << kun;
- }
- return out;
- }
- int main() {
- const vector<int> ages = {10, 5, 2, 12};
- cout << ages << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement