i have tried a program that it should show all words i typed, but it can't e.g. 1 2 3 1 <-- 2 <-- it always miss the last one then i continue to type 4 3 <-- it shows now !! However, if i change the loop into while( in_iter != eof){ *out_iter++ = *in_iter; ++in_ter; } it will be ...
Hi All, I am facing some problem using istream_iterator for reading the contents of a file and copying it in a vector of strings.However the same thing works for a vector of integers. The code that doesn't work is std::vector(fstrR ead), std::istream_iterator
Hi, I am just a newbie in STL and trying to learn istream_iterator. My problem is I want a program which will take a comma separated string from the command line, tokenize it and copies into a vector. Then I am printing the vector. Here is the code I tried. #include #include #include #include #include #include ...