Created
October 15, 2012 13:37
-
-
Save HappyCerberus/3892499 to your computer and use it in GitHub Desktop.
Ostream iterator demo
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 <algorithm> | |
#include <iostream> | |
#include <iterator> | |
using namespace std; | |
int main() | |
{ | |
int pole[] = { 10, 20, 30 }; | |
ostream_iterator<int> out(cout,", "); | |
copy(pole,pole+3,out); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment