tom: even easier would be:
cout << ctime(time(NULL)) << endl;