Created
January 16, 2015 18:37
-
-
Save cengiz-io/7a1fa51a0fdc4346211b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <vector> | |
template<typename T> | |
std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec) | |
{ | |
for (auto& el : vec) | |
{ | |
os << el << ' '; | |
} | |
return os; | |
} | |
int main() | |
{ | |
std::vector<std::string> words = { | |
"Hello", "from", "GCC", __VERSION__, "!" | |
}; | |
std::cout << words << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment