limiitng float value

i am writing a program that uses times but for times i am entering them as float values HH.MM
obviously the problem will come if cin a number like 15.75
what can i do to limit the decimal number to less than 59
It is probably better to not use float for this because they are not always precise. Use integers instead.
Topic archived. No new replies allowed.