获取系统时间精确到毫秒级C++代码实现
#include <windows.h>//必须包此头文件
#include<iostream>
using namespace std;
int main()
{
SYSTEMTIME t;
GetLocalTime(&t);
cout << t.wYear << "年" << t.wMonth << "月" << t.wDay << "日" //就是毫秒数
<< t.wHour << ":" << t.wMinute << ":" << t.wSecond << ":" << t.wMilliseconds << endl;