time_t rawtime;
struct tm * timeinfo;
char sec [80];
char min [80];
char hour [80];
char year[80];
char month[80];
char day[80];
time ( &rawtime );
timeinfo = localtime ( &rawtime );
string timetest;
timetest= strftime (sec,80,"%S",timeinfo);
timetest= strftime (min,80,"%M",timeinfo);
timetest= strftime (hour,80,"%H",timeinfo);
timetest= strftime (year,80,"%Y",timeinfo);
timetest= strftime (month,80,"%m",timeinfo);
timetest= strftime (day,80,"%d",timeinfo);
is there away to put it into a func or class or is there a better way to get the date and time?