I don\'t do much coding outside of Matlab, but I have a need to export my Matlab code to another language, most likely C. My Matlab code includes a histogram function, histc
GSL (GNU Scientific Library) contains a histogram implementation.
Here is the documentation: http://www.gnu.org/software/gsl/manual/html_node/Histograms.html.
And here is an example use: http://www.gnu.org/software/gsl/manual/html_node/Example-programs-for-histograms.html.