istreambuf_iterator STL question
hi everybody . please help me
freopen("in.txt", "r", stdin);
and in.txt is :
i want change this code read until ' ' charactor ! for example in first copy function dq become 95.123 . sorry for my bad eng language !
note : i want dq be char because it be big number !
Last edited on
Normally you would use
getline(stream, string, ' ')
for that, or some other stream parsing method.
But you could do with input iterators of course, as long as your algorithm is single-pass:
ifstream fin("in.txt"); // why freopen?
istreambuf_iterator<char> i(fin), end;
while(i != end && *i != ' ')
my dear i want use copy function !! i think i must define my char_traits and change eof type and send it to template argument of istreambuf_iterator
Topic archived. No new replies allowed.