Thread: Need help on these questions please

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    20

    Need help on these questions please

    How to read data from a disk file? process end of file and process error conditions?

    How do you compare bag and set? (I know set cannot have duplicates any other points?)

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    Very broad questions.

    Reading data from a file in C++ is done through the ifstream class. EOF and any errors can be detected by various member functions of the stream object, such as good(), bad(), and eof(). If a read operation fails, you can use one a number of such functions to figure out what happened.

    No idea what your second paragraph refers to.
    Last edited by MacGyver; 05-21-2007 at 10:58 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. questions....so many questions about random numbers....
    By face_master in forum C++ Programming
    Replies: 2
    Last Post: 07-30-2009, 08:47 AM
  2. A very long list of questions... maybe to long...
    By Ravens'sWrath in forum C Programming
    Replies: 16
    Last Post: 05-16-2007, 05:36 AM
  3. Several Questions, main one is about protected memory
    By Tron 9000 in forum C Programming
    Replies: 3
    Last Post: 06-02-2005, 07:42 AM
  4. Trivial questions - what to do?
    By Aerie in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 12-26-2004, 09:44 AM
  5. questions questions questions.....
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 08-14-2001, 07:22 AM