I am trying to get time input like 12:30:00 which is hour:minute:second and then put them in a struct. Im using cin but it only works when i use space instead of colon like 12 30 00. How can i make it work with colon instead of space? Please be as easy as possible im very newbie about this.
An example could be like:
struct time{
int hour,minute,second;
long acc_seconds;
}tm;
int main(){
cout <<"Please enter date as HH:MM:SS";
cin >> tm.hour>>tm.minute>>tm.second;
}