本人初学C++,有个问题请教下~谢谢!
#include<time.h> #include<iostream>
using namespace std;
int main(void)
{
struct tm *local;
time_t t;
t=time(NULL);
local=localtime(&t);
cout<<"local time and date:"<<endl<<asctime(local)<<endl;
return 0;
}
本人初学C++,要想把此程序用面向对象方法实现 如何做请您指教下!谢谢!