● Create a class called time that has separate int member data for hours, minutes, and seconds. ● One constructor should initialize this data to 0, and another should initialize it to given values. ● Another member function should display (print) it, in 11:59:59 format. ● A main() program should create two initialized time objects and one that isn’t initialized.
2 Questions:
● Create a class called time that has separate int member data for hours, minutes, and seconds.
● One constructor should initialize this data to 0, and another should initialize it to given values.
● Another member function should display (print) it, in 11:59:59 format.
● A main() program should create two initialized time objects and one that isn’t initialized.
Time Class and implementation.
https://www.cppexamples.xyz/2018/11/time-class-and-its-implementation-in-c.html
Post a Comment