Show DATE

Hello guys. I'm am new at C++ and maybe someone can help me with this task?

TASK:
I have two dates (year, month, day). I have to write a program, which shows, which
date is later.

And i don't understand how to make that if i have date in form like this with comma : 2016,05,01

Thank you in advance.
Last edited on
First you need to convert your string into int variables - probably with a stringstream.
The you can use mktime to create 2 time variables.
Finally you compare the two variables.

http://www.cplusplus.com/reference/sstream/stringstream/
http://www.cplusplus.com/reference/ctime/mktime/
Topic archived. No new replies allowed.