Histogram program

I am trying to make a histogram program with two different histograms. The data is brought in by cin and consists of two columns the first being number of grains dropped, and the other being the number of grains that avalanched. I want the one histogram to be the size of avalanche and the number of times it happened, and then the other one to be time since last avalanche. I am having a hard time writing the histogram part, any suggestions on how to do it? here is what I have right now.
http://ideone.com/BXwUN
Topic archived. No new replies allowed.