Skip to content

Instantly share code, notes, and snippets.

@dgyesbreghs
Created December 28, 2016 10:25
Show Gist options
  • Save dgyesbreghs/b99b109fd1a104a2ad917696d0b84879 to your computer and use it in GitHub Desktop.
Save dgyesbreghs/b99b109fd1a104a2ad917696d0b84879 to your computer and use it in GitHub Desktop.
Overload C++ << operator (vector int)
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