#include
#include
#include
using namespace std;
int main ()
{
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
printf ( "Current local time and date: %s", asctime (timeinfo) );
更新1:
ofstream fout("myfile.cpp"); fout
更新2:
fout << "This line is written to file.\n";<----------想f output 個time 入去個file
更新3:
fout.close(); ifstream fin("myfile.cpp");
更新4:
char ch; while (fin.get(ch)) //false if EOF is got
更新5:
cout
更新6:
return 0; }
更新7:
show 唔到我 #include stdio.h , time.h, #include ,
更新8:
其實我問題係我想 output 個時間入去個 file output 度... 但係我唔知道要 put 那一個 入去 fou<<果度, ths!
更新9:
得咗了.. 多謝你!!!!