CB> Is there an easy way to get the date/time as an ASCII
CB> string? eg:
CB> "22-06-1997, 2:06pm"
Yes. It is in the ANSI C standard time library.
#include
#include
class Time_Date {
public:
friend ostream &operator<<(ostream &o, Time_Date &tdc)
{ time_t T = time(&T); o << ctime(&T); return o; };
};
int main(void)
{
char a;
Time_Date td;
cout << td << flush;
cin >> a;
return 0;
}
> ] I am Solo of Borg, and I've got a bad feeling about this....
---
---------------
* Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)
|