Counting the # of items in an array

This is a discussion on Counting the # of items in an array within the C++ Programming forums, part of the General Programming Boards category; I have this prog and what I need to do is have the user input their numbers and print the ...

Counting the # of items in an array

I have this prog and what I need to do is have the user input their numbers and print the array, Then, for it to count the number of times the number was inputted and print a histogram of the number of times it was used. EX:

Here is what I have and I am unsure of the last few lines. I copied the last couple of lines from another example, I just included it because I know it will look somewhat to those lines. Please help, any help appreciated!

I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.