
hello Steven, I do appreciate your prompt reply.
AMDG Well, it solves your problem, but it creates other problems instead.
For example, what should this do: std::istream_iterator<int> iter(std::cin); std::advance(iter, 10);
Or this: std::istream_iterator<int> iter(std::cin); if(*iter != 10) { std::cout << *iter; }
In Christ, Steven Watanabe
Yes, my simple modification is obviously not complete and will cause other problems including those you mentioned. But I believe we are not at the situation that we should bear one of the two kinds of problems. There must be a sound solution, I guess. Or, in other words, in the situation as that I mentioned in my first post, should I use the ugly-looking explicit for loops instead of using the seemingly elegant iterator adaptor approach? :-) Thanks again for your time, Steven. B/Rgds Max