在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语言的函数,屡试不爽。
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语言的函数,屡试不爽。
博客介绍了在C++中获取系统时间的方法,可直接调用C语言的函数。文中给出了相关代码示例,还指出在很多情况下,C++都能直接调用C语言函数。
3487

被折叠的 条评论
为什么被折叠?



