Thread: C++ file IO

  1. #1
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278

    C++ file IO

    If once the file pointer is proceded forward during reading successively,the characters can be read well but when it is taken back bu using seekg() with appropiate parameters the file characters cannot be read properly,giving garbage values.The problem is tried on Visual C++ 6.0 and Borland C++ 4.5.

  2. #2
    Never Exist Hermitsky's Avatar
    Join Date
    Jul 2004
    Posts
    149
    If your code doesn't work properly, then there must be some bugs in your code.

    blow me ... ...

  3. #3
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    Is this a question ?
    Shure you can move backwards. But usually doing so on a file stream opened in text-mode gives you troubles ( especially on windows with its two char end of line markers ). Never had any problems with binary mode.
    Kurt

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 10:39 PM
  2. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  3. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 05:02 AM
  4. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  5. File IO with .Net SDK and platform SDK
    By AtomRiot in forum Windows Programming
    Replies: 5
    Last Post: 12-14-2004, 10:18 AM