problem in file handling

This is a discussion on problem in file handling within the C++ Programming forums, part of the General Programming Boards category; I am trying to write a code in which the input files are given from *.txt file as the input ...

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    3

    Post problem in file handling

    I am trying to write a code in which the input files are given from *.txt file as the input data is large in numbers.also the out file is in the same format.My problem is that if I want the output file as a input file for the rest code what will be the procedure.

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    2,684
    My problem is that if I want the output file as a input file for the rest code what will be the procedure.
    You could probably open the output file for reading and writing.

    Jim

  3. #3
    Registered User Inanna's Avatar
    Join Date
    May 2011
    Posts
    69
    Unless reads and writes are interspersed, it is simpler to use two fstream objects pointed to the same file.

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    3

    Post

    Quote Originally Posted by jimblumberg View Post
    You could probably open the output file for reading and writing.

    Jim
    It will be good if You send me how to generate two separate output*.txt file

  5. #5
    Registered User
    Join Date
    Jun 2011
    Posts
    3
    It will be good if You send me how to generate two separate output*.txt file

  6. #6
    Registered User
    Join Date
    May 2010
    Posts
    2,684
    To generate two separate output files you will need two separate output streams.

    Jim

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C(file handling problem)
    By Shayaan_Mustafa in forum C++ Programming
    Replies: 5
    Last Post: 12-31-2010, 05:02 PM
  2. another file handling problem
    By 1978Corvette in forum C Programming
    Replies: 5
    Last Post: 04-27-2006, 12:38 AM
  3. Problem in file handling.
    By Abhid in forum C Programming
    Replies: 6
    Last Post: 02-18-2005, 11:11 PM
  4. problem with file handling
    By gell10 in forum C++ Programming
    Replies: 8
    Last Post: 11-09-2003, 02:09 AM
  5. File Handling problem
    By skyttkar in forum C++ Programming
    Replies: 1
    Last Post: 07-10-2003, 05:35 AM

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