i wanna make a program on c++ that tells you how many days, years and months need to pass to get to a certain date. Also i wanna include how many hours and minutes need to pass. So my problem is that开发者_高级运维 i do not know how to get the current date and time to a variable from the command "time" on cmd or anyway to get the current date date and time so it will work. I accespt the program done already so i can see it and end my doubts.
http://www.cplusplus.com/reference/clibrary/ctime/
- Get input with getline()
- Parse string to date format
- Use some time/data library to find the difference
- Output to console
While this is almost certainly homework, you might find this post useful (points to the Boost library): C++ DateTime class
精彩评论