calculate the remaining time

hi i need the function which can say how much time remain to the last date.

the last date is input,i mean the last date is given to code by user,and this function calculate

the last date - today date = ?

my english isnt good enough.i hope u can understand me.
Last edited on
Unless you want to do it manually, you need a DateTime class.
The following Boost.Date_Time example is exactly what you need:
http://www.boost.org/doc/libs/1_44_0/doc/html/date_time/examples.html#date_time.examples.days_alive

Documentation:
http://www.boost.org/doc/libs/1_44_0/doc/html/date_time.html
thank you but i cant understand this functions.

which function can help me?
Topic archived. No new replies allowed.