Solved

Mini-mart Inventory control system

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

708 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