#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    38
    Rep Power
    12

    Can you only open 1 file at a time with fstream open()


    I have two files opened and I am inputing values from both, but it seems like the second file I open and input values from is grabbing the data from the first file I opened. I am using fstream open() and grabbing the data 1 byte at a time.

    Does anyone know if there is a limiation on the number of files to be opened at a time. Thanks.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    There is a limitation, but it is in the range of some 1,000 or 10,000 depending on your OS (and -configuration). Probably you have an error in your code.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    38
    Rep Power
    12
    Alright, thats all I needed to know. Thanks.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    Flint, MI
    Posts
    328
    Rep Power
    13
    This is going to sound stupid, but make sure that you have two separate fstream objects, and that you aren't re-opening the same object.
    Clay Dowling
    Lazarus Notes
    Articles and commentary on web development
    http://www.lazarusid.com/notes/

IMN logo majestic logo threadwatch logo seochat tools logo