设为首页 加入收藏

TOP

显示当前系统时间(Linux C++)
2014-11-24 08:45:03 来源: 作者: 【 】 浏览:0
Tags:显示 当前 系统 时间 Linux

#include


#include


using namespace std;


int main()


{


int x,h,m,s;


x=time(NULL);


h=x/3600%24+8; //中国时区加8


m=x%3600/60;


s=x%3600%60;


cout<<"The current time is:"<

return 0;


}


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Android 框架之创建设备节点文件 下一篇Linux脚本编程:Bash shell脚本的..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·有没有哪些高效的c++ (2025-12-27 08:20:57)
·Socket 编程时 Accep (2025-12-27 08:20:54)
·计算机网络知识点总 (2025-12-27 08:20:52)
·一篇说人话的文章, (2025-12-27 07:50:09)
·Python Web框架哪家 (2025-12-27 07:50:06)