searching for a specific item in a C++ file

This is a discussion on searching for a specific item in a C++ file within the C++ Programming forums, part of the General Programming Boards category; hey, i have a written a C++ class to a file. i can print the entire contents of the file ...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    7

    searching for a specific item in a C++ file

    hey,

    i have a written a C++ class to a file. i can print the entire contents of the file eg.

    ID NAME ADDRESS AMOUNT
    100 John China 100.00
    200 Tom Iran 500.00
    300 Ann Japan 600.00


    my problem is, i can only print all the info from the file at once i cant print the information specific to id #200 ...Tom.

    Could i get some help please ?

    thanks
    Stan

  2. #2
    Registered User
    Join Date
    May 2002
    Posts
    317
    Check out this thread, it should give you what you need:

    http://www.cprogramming.com/cboard/s...threadid=19055

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 04:53 AM
  2. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 08:51 PM
  3. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 05:14 AM
  4. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 09:39 AM
  5. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 10:54 AM

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