[RESOLVED] c++ data structures program to search records by different fields

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How can i make my c++ program to read this file, read records as arrays, sort them, and search either by book name or by the auhtor. If i write Tolkiends, how can i make it output all the books written by J R R tolkiens?

Re: c++ data structures program to search records by different fields

My boss asks for atleast the file handling code till coming monday. Where as i have to submit the whole task ,on visual c++, by the end of next week! Sir, i dont have time to study the whole picture write now! Even much of this code i have taken help from source codes. Only if you could help me with this please, i will be able to complete my task!

Re: c++ data structures program to search records by different fields

Originally Posted by smrizvi1

I work in a small library and have been given a task to make a program.
...
How can i make my c++ program to read this file,
...

If this is really something you need for a 'small library', rather than a homework question, then just use a Spreadsheet or a Database. If you don't have one, you can get OpenOffice for free (http://www.openoffice.org/)

Even if you don't currently know how to use a Spreadsheet/Database to do this, it will be a lot easier to learn this than trying to learn C++ in a few days. And the resulting application is much more likely to be bug-free.

When you have written this function then let's talk about linked lists. If you don't have this function, then why even try to code anything else? This is the first function you should have written, as nothing else matters if you don't have the ability to take a string and create a BookInfo from it.

Re: c++ data structures program to search records by different fields

Originally Posted by smrizvi1

My boss asks for atleast the file handling code till coming monday. Where as i have to submit the whole task ,on visual c++, by the end of next week! Sir, i dont have time to study the whole picture write now! Even much of this code i have taken help from source codes. Only if you could help me with this please, i will be able to complete my task!

This forum frequently (and erroneously) gets taken for a sort of ambulance for half dead projects reanimation. In case you cannot drive a car, you just don't drive. If you have no time to study driving, you just don't drive. If you cannot do programming and have no time to study programming, you just don't do programming.

Re: [RESOLVED] c++ data structures program to search records by different fields

my task is to make a structure to store the record of library. The record must consist of at least following fields: Title, Author, Edition, Price, Publisher, Category.
-Define functions authorSearch ( ), TitleSearch ( ) and CategorySearch( ) to search a book with respect to author, title and category. [There can be more than one books, written by one author, in one category]
The program must be menu driven with the following choices:
1> Add new record
2> Search a book w.r.t author
3> Search a book w.r.t Title
4> Search a book w.r.t category
5> Exit
The program must be able to store at least 50 records.
plz help me