Thread: open files etc. which have become

  1. #1
    Registered User
    Join Date
    May 2011

    open files etc. which have become

    Hello hello I'm from Indonesia I know there is a problem how do I open the file again. etc that is so into the program C + + because I need the source code seems willing to help me thanks

  2. #2
    Registered User
    Join Date
    Jun 2005
    Close the existing file (or stream). It is then possible to open it again.

    If you want to open the file from two sections of code simultaneously (for example, two programs running at the same time, and both opening and reading the same file), then you usually need to use extensions specific to your operating system. Generally speaking, C and C++ standard libraries assume such sharing is not needed, although you can get lucky in some cases with some libraries (eg when both open streams are for read-only access).

    That means no general code solution is possible. You need to read documentation for your operating system, compiler, and library and determine what extensions they support.
    Last edited by grumpy; 05-26-2011 at 02:51 PM.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Too many files open?
    By homer_3 in forum C++ Programming
    Replies: 2
    Last Post: 11-11-2008, 10:17 PM
  2. open several files and execute?
    By autopilot in forum C Programming
    Replies: 26
    Last Post: 09-11-2007, 06:12 AM
  3. How to open multiple files?
    By Astra in forum C Programming
    Replies: 12
    Last Post: 11-21-2006, 10:48 AM
  4. Open MRS files
    By lamdba in forum Game Programming
    Replies: 3
    Last Post: 01-24-2006, 11:27 AM
  5. how to open exe files
    By InvariantLoop in forum C++ Programming
    Replies: 4
    Last Post: 05-06-2004, 07:26 PM