Created
December 28, 2016 10:25
-
-
Save dgyesbreghs/b99b109fd1a104a2ad917696d0b84879 to your computer and use it in GitHub Desktop.
Overload C++ << operator (vector int)
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
std::ostream& operator<<(std::ostream &strm, const vector<int> &a) { | |
for (auto item : a) { | |
strm << item << std::endl; | |
} | |
return strm; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment