Reading/writing characters

This is a discussion on Reading/writing characters within the C++ Programming forums, part of the General Programming Boards category; Hi all, i am reading a text file from disk using ifstream,when i write back the same file on disk ...

  1. #1
    Registered User
    Join Date
    Jun 2007
    Location
    Qatar
    Posts
    39

    Smile Reading/writing characters

    Hi all,
    i am reading a text file from disk using ifstream,when i write back the same file on disk using ofstream.it omits the last characters.For example i read 2600 characters but when i write back on disk,the characters printed are about 2533.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,649
    [edit]Unless you're converting DOS newlines into *nix newlines,[/edit] I'd say you have a bug in you code

    Let's see a small sample of code the reproduces the issue.

    gg
    Last edited by Codeplug; 09-03-2007 at 12:07 AM.

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. Replies: 10
    Last Post: 07-10-2008, 03:45 PM
  3. How do you check how many characters a user has entered?
    By engstudent363 in forum C Programming
    Replies: 5
    Last Post: 04-08-2008, 06:05 AM
  4. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  5. Reading/Writing in Binary
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 12-11-2001, 09:32 PM

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