C++ file IO

This is a discussion on C++ file IO within the C++ Programming forums, part of the General Programming Boards category; If once the file pointer is proceded forward during reading successively,the characters can be read well but when it is ...

  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
    ZuK
    ZuK is offline
    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, 11:39 PM
  2. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 01: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, 04: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

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