i use localtime function to get current time, in "tm struct".
how do i get a new "tm struct" that adds the specified number of days to the value of this instance.
this is similar with DateTime::AddDays, but i don't use any MFC Class.
struct tm * tt;
tt = localtime(&t);
int dayOfWeek = tt->tm_wday;
tt->tm_mday -= dayOfWeek;
in this code there is a bug.
if tt->tm_mday < dayOfWeek then ???
please help me.