Thread: forgot how to rewind in C++

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    63

    forgot how to rewind in C++

    i know how to use rewind in C but now i'm using fstream and need to rewind my file, i guess i could just close it and re open it but thats uglier than what i'm already attempting..

    how would one rewind a file called 'in' in c++? ??

    gracias
    SS3X

  2. #2
    Registered User subdene's Avatar
    Join Date
    Jan 2002
    Posts
    367
    If you want to go back to the begining of a file, just do:

    InFile.seekg(ios::beg);

    I think that's what you want.

  3. #3
    Registered User Sekti's Avatar
    Join Date
    Feb 2002
    Posts
    163

    i think

    i think he wants it to refreash
    +++
    ++
    + Sekti
    ++
    +++

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to find coomon data in 3 files without rewind..
    By transgalactic2 in forum C Programming
    Replies: 31
    Last Post: 03-29-2009, 03:23 PM
  2. Forgot how to use base class properly
    By gustavosserra in forum C++ Programming
    Replies: 3
    Last Post: 04-23-2004, 06:02 AM
  3. forgot how to do somthing...
    By ackman in forum C++ Programming
    Replies: 3
    Last Post: 06-25-2002, 04:57 PM
  4. The pc that time forgot....
    By Fordy in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-19-2001, 06:37 PM
  5. Sorry, forgot to log in when I posted this message....
    By face_master in forum C++ Programming
    Replies: 2
    Last Post: 08-27-2001, 09:13 AM