Open a file, read it ... and ... read it again

This is a discussion on Open a file, read it ... and ... read it again within the C Programming forums, part of the General Programming Boards category; After reading a file how do we manage to put the file pointer back to the beginning of the file? ...

  1. #1
    Registered User Tiago's Avatar
    Join Date
    Oct 2009
    Location
    Lisbon, Portugal
    Posts
    28

    Open a file, read it ... and ... read it again

    After reading a file how do we manage to put the file pointer back to the beginning of the file?


    ty...
    Last edited by Tiago; 04-17-2010 at 04:32 AM.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,166
    rewind(fp), where fp is the FILE pointer.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21