Monday, July 27, 2009

I want to read a record from a database file using c?

i have a simple text database having name of employee his salery and his designation.now using a c program i want to find salery of a employee by providing his name.how i can do that if anybody has sample code please give me...

I want to read a record from a database file using c?
I hope you are giving a defined field size to your lines so that it would make your job a bit easier. What you will need to do is simply open the file up and get a stream, then do a search for the person's name.





I have added a wonderful site for you that shows you own to open the streams, read from them, search them etc. The one that is particularly useful is the example towards the bottom where they search for a character in a file.





Hope this helps you out. Good luck!


No comments:

Post a Comment