Solved

Mini-mart Inventory control system

Posted on 2006-06-21
5
1,438 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
  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 …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

895 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now