• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1565
  • Last Modified:

Mini-mart Inventory control system

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
PRABAUSHA
Asked:
PRABAUSHA
  • 2
2 Solutions
 
gran88Commented:
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
 
Andrew BeersCommented:
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
 
PRABAUSHAAuthor Commented:
Thanx guys..
0
 
Andrew BeersCommented:
((Thanx guys)) and a B?  o.O;  Did you want us to write the program for you?

~Aqua
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now