c++ 输入流输出流迭代器

#include 
#include 
#include 
#include 
using namespace std;

int main() {

    int sz[6] = { 1,2,3,4,5,6 };
    vectorob(sz, sz + 6);
    //ostream_iterator osi(cout, " ");
    //copy(ob.begin(), ob.end(), osi);

    istream_iterator isi(cin);
    copy(isi, istream_iterator(), back_inserter(ob));
    for (vector::iterator it = ob.begin(); it != ob.end(); it++)
    {
        cout << *it << " ";
    }
    cout << endl;
    system("pause");
    return 0;
}

你可能感兴趣的:(c++ 输入流输出流迭代器)