Click here to Skip to main content
15,894,825 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralQuestion about output iterator. Pin
George25-Feb-03 3:16
George25-Feb-03 3:16 
GeneralRe: Question about output iterator. Pin
Joaquín M López Muñoz5-Feb-03 8:01
Joaquín M López Muñoz5-Feb-03 8:01 
GeneralRe: Question about output iterator. Pin
George25-Feb-03 19:58
George25-Feb-03 19:58 
GeneralRe: Question about output iterator. Pin
Joaquín M López Muñoz5-Feb-03 22:40
Joaquín M López Muñoz5-Feb-03 22:40 
GeneralRe: Question about output iterator. Pin
George25-Feb-03 23:53
George25-Feb-03 23:53 
GeneralRe: Question about output iterator. Pin
George27-Feb-03 4:54
George27-Feb-03 4:54 
GeneralQuestion about input iterator on the same input stream. Pin
George24-Feb-03 19:26
George24-Feb-03 19:26 
GeneralRe: Question about input iterator on the same input stream. Pin
Joaquín M López Muñoz4-Feb-03 20:14
Joaquín M López Muñoz4-Feb-03 20:14 
You're twisting the semantics of istream_iterators: You only can do the following with such an iterator:
  • Check for the end of stream with the expression it==istream_iterator<int>().
  • retrieve a value from the associated istream with an expression of the form x=*it;.
  • Increment the iterator with ++it or it++.Moreover, after retrieving a value, you must increment the iterator previous to further retrievals. That's it, do not assume you can do much else with such iterators. Do no think these iterators are something like pointers to the data contained in the file, because they are not, hence the odd results when testing r and s for equality. istream_iterator is designed as a convenient adaptor to take advantage of generic algoritms, as such its functionality is strictly limitied to what these algorithms require.

    Joaquín M López Muñoz
    Telefónica, Investigación y Desarrollo

  • GeneralRe: Question about input iterator on the same input stream. Pin
    George25-Feb-03 1:17
    George25-Feb-03 1:17 
    GeneralQuestion about copy algorithm of STL. Pin
    George24-Feb-03 19:23
    George24-Feb-03 19:23 
    GeneralRe: Question about copy algorithm of STL. Pin
    valikac4-Feb-03 20:08
    valikac4-Feb-03 20:08 
    GeneralRe: Question about copy algorithm of STL. Pin
    George25-Feb-03 1:09
    George25-Feb-03 1:09 
    GeneralRe: Question about copy algorithm of STL. Pin
    Ryan_Roberts5-Feb-03 3:29
    Ryan_Roberts5-Feb-03 3:29 
    GeneralRe: Question about copy algorithm of STL. Pin
    George25-Feb-03 19:39
    George25-Feb-03 19:39 
    Questionstl version of CString? Pin
    Nitron4-Feb-03 13:47
    Nitron4-Feb-03 13:47 
    AnswerRe: stl version of CString? Pin
    Michael Dunn4-Feb-03 14:04
    sitebuilderMichael Dunn4-Feb-03 14:04 
    GeneralRe: stl version of CString? Pin
    Alexandru Savescu4-Feb-03 21:09
    Alexandru Savescu4-Feb-03 21:09 
    GeneralRe: stl version of CString? Pin
    Tim Smith5-Feb-03 2:30
    Tim Smith5-Feb-03 2:30 
    GeneralRe: stl version of CString? Pin
    Nitron5-Feb-03 6:16
    Nitron5-Feb-03 6:16 
    GeneralRe: stl version of CString? Pin
    Ben Burnett7-Feb-03 13:55
    Ben Burnett7-Feb-03 13:55 
    GeneralRe: stl version of CString? Pin
    Nitron8-Feb-03 4:31
    Nitron8-Feb-03 4:31 
    GeneralRe: stl version of CString? Pin
    Ben Burnett8-Feb-03 5:52
    Ben Burnett8-Feb-03 5:52 
    GeneralRe: stl version of CString? Pin
    Nick Parker10-Feb-03 5:18
    protectorNick Parker10-Feb-03 5:18 
    Generalpredicate function Pin
    User 98854-Feb-03 7:26
    User 98854-Feb-03 7:26 
    GeneralRe: predicate function Pin
    Joaquín M López Muñoz4-Feb-03 7:49
    Joaquín M López Muñoz4-Feb-03 7:49 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.