Home > Back-end >  Please comment C time for problems
Please comment C time for problems

Time:12-10


A beginner entering c + + under the gate would like to ask you

Seconds, such as how to get the current time now is five points and 14 seconds at 4 PM and I need to get the 14 seconds

Baidu online is to write a lot of,,
Whenever I get seconds, is there a simple point,

CodePudding user response:

And call the time function can obtain
 
#include
CTime time (CTime: : GetCurrentTime ());
SYSTEMTIME timeDest;
Time. GetAsSystemTime (timeDest);
Output calendar (timeDest wYear, timeDest wMonth, timeDest. WDay);

CodePudding user response:

reference 1/f, the wise know already should good karma response:
and call the time function can obtain
 
#include
CTime time (CTime: : GetCurrentTime ());
SYSTEMTIME timeDest;
Time. GetAsSystemTime (timeDest);
Output calendar (timeDest wYear, timeDest wMonth, timeDest. WDay);
is there any way a line out! I only want seconds!

CodePudding user response:

Directly after you get the current number of seconds, 60, is the current number of seconds
  • Related