Link to home
Start Free TrialLog in
Avatar of nploving
nploving

asked on

Counting Items in an Array

I'm stomped.  I have to write a C++ program that creates an array of part numbers and prices.  The program must be equipped with an error function that seperates valid part numbers (within preset parameters) from invalid part numbers.  I think I have it relatively bug free except I need to know the series of commands that counts the actual items within an array.  Specifically, I need my program to count the amount of times a part number that was entered is valid and the amount of part numbers that are invalid.  Your help will be greatly appreciated.  Also, if you know where I can find various examples of C++ array code, that would be great.
ASKER CERTIFIED SOLUTION
Avatar of nietod
nietod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nploving
nploving

ASKER

Very good, but how do I count the part numbers that don't show up in this array.  Do I create a seperate array for parts not found.  I'm pretty lost here.  Do you know where I can find a bunch of examples of C++ array programs so that I can get a feel for what functions to use in various situations.  It would help me alot if you could take a look at what I've done.  I hope its not asking too much, but I'm in a pinch.  Thanks.
>> how do I count the part numbers that don't
>> show up in this array.  Do I create a seperate
>> array for parts not found.
I can't really say.  It depends on what the program needs to do--overall.

>> Do you know where I can find a bunch of
>> examples of C++ array programs
Almost no programs don't use arrays.  Arrays can be used in so so many this isn't likely to help you.  Better to develope what you need for this case.  I can probably help, but I don't know what you need to do.