现在的位置: 首页 > 综合 > 正文

C++中取得时间的方法

2013年09月22日 ⁄ 综合 ⁄ 共 202字 ⁄ 字号 评论关闭
在C++中需要取得系统时间,可以直接用c中的函数调用取得时间。
void CYttyDlg::OnButton7()
{
// TODO: Add your control notification handler code here
int s=time((time_t *)NULL);
CString aa;
aa.Format("%d",s);
AfxMessageBox(aa);
}

还有很多情况下可以直接调用c语言的函数,屡试不爽。

抱歉!评论已关闭.