Wrox Programmer Forums
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 30th, 2004, 01:37 AM
Authorized User
 
Join Date: Oct 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Once again

I write in reply 2 yo question.
I'm writing these records as objects of the class.
So should i use functions with the objects as the arguments.
Otherwise, my task is to retrieve a specific record from the disk file after writing them.

programmed.

Reply With Quote
  #2 (permalink)  
Old July 1st, 2004, 07:17 AM
Authorized User
 
Join Date: Jun 2004
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to silver_cuts Send a message via Yahoo to silver_cuts
Default

Hi Programmed,

You write the entire object to the file right?

So he is what you do.

Open the file and read one object from it.. Check if the customer no. is matching .. if yes you have found the record that you are looking for if not read next record ... repeat this procedure till you reach the EOF .. if you reach EOF before finding the record means that you dont have any record in the file corresponding to what you are looking for ..

Another thing that i would like you to do in this is keep this search function as a MEMBER function of the class whose objects which write into the file .. i think it will make your coding easier ...

if you have any more trouble send me your code .. i will try to look into it ... but try urself first ...

Well all the best ...

Of course my email id
[email protected]

and plz tell me your name .. programmed sounds weird

Sudhan.


--------------------------------------------------
Sudhan Kanitkar.
Everything Is In Our Hands.
Reply With Quote









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.