hi,
I am a new member here i hope that found some one who can help me in this C++ project
I am a novice in C++ and this will be my first code if any one has experience please help me in the algorithm and what should i do to start in this code


Write a program that store information of pharmacy system in sequential text file (.txt) where store some fields like :
1) drug ID "primary key "
2) drug name
3) price
4) type of package " capsules , syrup , ointment ..."
and the project do this operations :
1) write a new drug in the file that enter later in the pharmacy
2) if you enter drug found in the file you must update drug amount field only
3) read the entire pharmacy
4) search a record by drug ID, drug name , and type of package fields
5) delete any record from the pharmacy by drug ID

"all data retrieve from the file show in table form &the pharmacy file must contain at least 15 record as sample data &you can determine the file size as approximate form what it mean ."

Here's a similar request: Can you help me mow the grass?

There are multiple options with such a project, but without knowing what tools you have available (are allowed to use), it is difficult to provide much guidance. Do you know about user defined types like structs/classes? Do you know about containers like arrays, lists, vectors? Do you know how to set up files, read/write to files, etc?

Once we know what tools you have we can help set things up. We can get a reasonable idea of your capabilities if you write out what you want to do on paper using pseudocode:

1) Declare struct to represent a drug.
a) Each drug object will have the following information: etc
b) each drug object can do the following: etc
2) Declare a node class to be used in an STL list. Each node will contain a drug object and a pointer to the next node in the list

or

1) declare multiple arrays to run in parallel. Arrays will be needed for the following fields: etc.

You don't need to declare a node class if you are going to use an STL list to keep track of the drug inventory. You do though if you are going to create your own list class, for example, if you aren't allowed to use the STL list class. I got my lines of thought crossed there a bit. My apologies.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.