Solved

Mini-mart Inventory control system

Posted on 2006-06-21
5
1,484 Views
Last Modified: 2008-03-10
I need to do a project on inventory systm but I really bad with c++. My requirements are : Input Stock, sales item, replenishment of items, report generation. How do i link all this 4 by using array and do/while ? All i need a simple programme code example to work on.
0
Comment
Question by:PRABAUSHA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 2

Assisted Solution

by:gran88
gran88 earned 150 total points
ID: 16951746
An array of pointers would be your best best.  Here's some pseudo code

declare array;
do
{
  fill up array;
}
while (array isn't full);

generateReport();
printReport();

Have fun with the data entry!
0
 
LVL 10

Accepted Solution

by:
Andrew Beers earned 350 total points
ID: 16954480
o.O;

array of pointers!?

...

Your telling someone someone who said "I really bad with c++. " To use pointers?  *cough*Memory Leak*cough*

((Also this question belongs in C++ not Game Dev))

Your best off finding a prebuilt linked list structure that manages memory control for you.  Your nodes will be your inventory objects, and whne you need to remove or insert data you can just use a linked lists insert function.  Using an array of pointer objects still leaves you with reorganizing arrays when your linked list structure will allow you to remove data after it's been sold and reported on to free up additional memory.

Amazingly a tripod site has a decent explination of creating a linked list in c++:

http://richardbowles.tripod.com/cpp/linklist/linklist.htm

Then you create a class to manage the inventory items.. your node will just be a pointer to an object (The linked list structure you find should handle this for you as far as destroying the object):
http://www.gillius.org/ooptut/

Between those two sites you should have no problem and enough sample code to cut and paste the entire project.

Good Luck,
Aqua

0
 

Author Comment

by:PRABAUSHA
ID: 16957680
Thanx guys..
0
 
LVL 10

Expert Comment

by:Andrew Beers
ID: 16960185
((Thanx guys)) and a B?  o.O;  Did you want us to write the program for you?

~Aqua
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question