Good day!
I have this code that is assume to get the difference in time. Is it possible to get the difference of from a string time variable? Or, whats the best way to implement this?
#include<iostream>
using namespace std;
int main()
string timediff, timein, timeout;
cout<<"Enter player time-in between 08:00 to 17:00: ";
cin>>timein;
cout<<"Enter player time-out between 08:00 to 17:00: ";
cin>>timeout;
if(timeout<"17:00")
{
cout<<"This player is playing in undertime"<<endl;
}
timediff=timeout-timein;
cout<<"The time that the players played is: "<<timediff<<endl;
system("pause");
return 0;
}
Any help is gladly appreciated! Thank you!