simple c++ histogram class