forgot how to rewind in C++

This is a discussion on forgot how to rewind in C++ within the C++ Programming forums, part of the General Programming Boards category; i know how to use rewind in C but now i'm using fstream and need to rewind my file, i ...

  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
    359
    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, 04:23 PM
  2. Forgot how to use base class properly
    By gustavosserra in forum C++ Programming
    Replies: 3
    Last Post: 04-23-2004, 07:02 AM
  3. forgot how to do somthing...
    By ackman in forum C++ Programming
    Replies: 3
    Last Post: 06-25-2002, 05: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, 07: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, 10:13 AM

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