Gonna put this in here because there is no C++ code repository (perk?

).
Just wrote this. It's trivial but it may help someone and I was interested in the use of iomanip which, surprisingly, I haven't realy delved into before.
This prints yesterday's (now - 86400 seconds) date, formatted as I wanted it, could easily be modified to perform a lot of date related tasks........
#include <time.h>
#include <iostream>
#include <iomanip> // For formatting output
using namespace std;
int main( void )
{
time_t now;
struct tm * timeinfo;
time( &now );
now -= 86400; // Seconds in a day
timeinfo = localtime( &now );
cout << setfill('0' ) << setw( 2 ) << timeinfo->tm_mday << " "
<< setw( 2 ) << timeinfo->tm_mon + 1 << " " << setw( 2 )
<< timeinfo->tm_year - 100 << endl;
}
Cheers,
td