c++学习笔记--改变系统时间
2017-08-31 13:19
411 查看
#include <iostream> #include <Windows.h> int main(){ //声明变量 SYSTEMTIME sys_time; //将变量值设置为本地时间 GetLocalTime( &sys_time ); //输出时间 printf( "%4d/%02d/%02d %02d:%02d:%02d.%03d 星期%1d\n",sys_time.wYear, sys_time.wMonth, sys_time.wDay, sys_time.wHour, sys_time.wMinute, sys_time.wSecond, sys_time.wMilliseconds, sys_time.wDayOfWeek); system("time"); system("pause"); return 0; }
相关文章推荐
- 【C++学习笔记】返回桌面等特系统殊路径地址 —> SHGetSpecialFolderPath
- linux学习笔记之小谈时钟时间,用户CPU时间,系统CPU时间
- 【C++学习笔记】计算程序运行所用的时间
- 学习笔记之三 获取系统时间的方法汇总
- Android(java)学习笔记96:如何改变spinner系统自带的字体和颜色
- 【C#学习笔记】获得系统时间
- C++学习笔记-2 C++类型系统
- c++学习笔记(九):C++日期和时间
- C/C++学习笔记27:(二)C文件系统操作
- 【C++学习】之如何用系统日期时间给文件命名
- python学习笔记:获取系统时间
- 商场收银系统之策略模式学习笔记[C++版]
- C/C++学习笔记26:(一)C文件系统概述
- c++入门学习之输出系统日期和时间
- 数字信号处理学习笔记一:离散时间信号与离散时间系统
- C++学习笔记(20161114 ) 根据指定目标时间获得时间戳(秒数)
- 数字信号处理学习笔记一:离散时间信号与离散时间系统
- Qt学习笔记之系统时间的获取
- 数字信号处理学习笔记二:Z变换及离散时间系统分析
- OpenCV(C++接口)学习笔记3-求算法的运行时间