c++ Prime learning