can someone plz give me the code to find out the date and time today (now) in C++? thanks
Printable View
can someone plz give me the code to find out the date and time today (now) in C++? thanks
chemCode:#include <stdio.h>
#include <time.h>
int main( )
{
char dateStr [9];
char timeStr [9];
_strdate( dateStr);
printf( "The current date is %s \n", dateStr);
_strtime( timeStr );
printf( "The current time is %s \n", timeStr);
}
sorry but Im a newbie :S
is this is C or C++?
I need it in C++
thx
That would be compilable in both C and C++.
chem