I'm working on a small "Time" functions library just to learn more about how to work with C++ and functions in general.
I'm having a function that is called Time(int hh, int mm, int sec)
I want if the user enters Time(11, 9, 14)
I want to store this values in memory as hh = 11; mm = 09; sec = 14;
to be used later on.
I know that if I were to use a cout
I could have used cout << setw(2) << setfill('0') << mm << endl;
But now I want to directly store the value as an int, how do I do this?`
I tried time = (tt > 10) ? 0 + mm : mm;
But i guess this is just like doing basic addition 0+9 = 9.