I have created this code with the classes for time and message. Basically the point of this code is to give the information of the sender, recipient, time, and message and im having issues with the time part. I was hoping someone could help me.
So you need to calculate the seconds, minutes and hours from time_in_secs. It's probably easiest if you calculate them in order from smallest to largest unit. Start with the seconds. When you have caclulated the seconds think how you can calculate the minutes, and so on.
This is how the time will be displayed!. Just a little modification of your function string Message::to_string() is done and included <sstream> to convert int to string in a quick and efficient manner: