[求助]c++中怎样获取系统日期和系统时间
c++中怎样获取系统日期和系统时间,请各位帮忙,谢谢
#include<time.h>
#include<iostream>
using namespace std;
int main()
{
time_t timeval;
timeval=time(NULL);
cout<<"Time as local time is "<<ctime(&timeval)<<endl;
return 0;
}