01: #include <iostream> 02: #include <iomanip> 04: using namespace std; 05: 06: #include "ccc_time.h" 07: /** 08: Print a time in the format h:mm:ss 09: @param t the time to print 10: */ 11: void print_time(Time t) 12: { cout << t.get_hours() << ":" << setw(2) << setfill('0') 13: << t.get_minutes() << ":" << setw(2) 14: << t.get_seconds() << setfill(' '); 15: } 16: 17: int main() 18: { Time liftoff(7, 0, 15); 19: Time now; 20: cout << "Liftoff: "; 21: print_time(liftoff); 22: cout << "\n"; 23: 24: cout << "Now: "; 25: print_time(now); 26: cout << "\n"; 27: 28: return 0; 29: }