Reading Colon Separated Data

Hi, I'm trying to read a colon separated data and not sure how to tackle it. I am able to read it as a string and trying to read the values separately so I can use them for calculation (finding seconds). I need some help!

Please do not use structs, classes and such. I am in a cpp class and we are learning about selection statements, functions.

I have tried using getline for my program and it is not working right!

My text file :
Time 10:20:30

1
2
3
char drop_it;
int hour, minute, second;
cin >> hour >> drop_it >> minute >> drop_it >> second;
may use http://www.cplusplus.com/reference/istream/istream/ignore/ to get rid of the "Time " at the beggining, or just a dummy string.
Thank you, so much ne555. Your link did the trick for me. I was trying to read the line instead of storing the values in a variable and ignoring the colon. Thanks!
Topic archived. No new replies allowed.