stereomatching 17 Posting Whiz in Training
std::copy (std::istream_iterator<string>(cin),         // beginning of source
        std::istream_iterator<string>(),            // end of source
        std::ostream_iterator<string>(cout,"\n"));  // destination

how could I quit from it?

besides, if I want to copy partial data from std::ifstream
what should I do with the copy algorithm?
following code would copy all of the data into the container buffer
but I only need partial of it

std::copy(std::istream_iterator<unsigned char>(inFile), std::istream_iterator<unsigned char>(), buffer.begin());

Thanks a lot

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.