problem with reading from file

This is a discussion on problem with reading from file within the C++ Programming forums, part of the General Programming Boards category; im having some trouble with the function createvideostore in mytestVideoStore.cpp why isnt it reading the info from customer.txt???...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    134

    problem with reading from file

    im having some trouble with the function createvideostore in mytestVideoStore.cpp

    why isnt it reading the info from customer.txt???
    Last edited by noob2c; 09-20-2003 at 02:00 PM.

  2. #2
    Registered User
    Join Date
    Sep 2003
    Posts
    71
    If you're using a string then you must add a special extra arguement when you file1.open( )

    I don't know...
    Name: Eric Lesnar
    Learning: C/C++, SDL, WinAPI, OpenGL, and Python
    Compiler: Dev-C++ 4.9.0
    Current Game Project: Acoznict

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    134
    but then it does work for videoDat, why not for customerDat?

  4. #4
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Code:
    cerr<<"Input file \"videoDat.txt\" does not exist"<<endl;
    is certainly wrong.

    }//end for
    is ending a WHILE loop. (no, the comment doesn't affect the code)

    >>why isnt it reading the info from customer.txt???<<
    Care to tell us what is wrong? What the program is doing? Care to read the board rules?

    >> If you're using a string then you must add a special extra arguement when you file1.open( )<<
    WTF?
    Away.

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    134
    yes, the createvideostore function is supposed to read all the info from customerDat.txt and input it correctly. I have no clue why it isnt doing so.

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    134
    okay i figured out what was going wrong, it now inputs the name of the clients but not the name of the movies they have rented out. im uploading the modified files.

  7. #7
    Registered User
    Join Date
    Mar 2003
    Posts
    134
    k.
    Attached Files Attached Files

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  2. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  3. Replies: 20
    Last Post: 06-12-2005, 11:53 PM
  4. Replies: 3
    Last Post: 03-04-2005, 01:46 PM
  5. Problem reading file
    By winsonlee in forum C Programming
    Replies: 2
    Last Post: 04-23-2004, 06:52 AM

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