c language....
How can i get date function from c compiler?
#include %26lt;stdio.h%26gt;
#include %26lt;time.h%26gt;
int main( void )
{
time_t timet;
struct tm *timePtr;
timet = time( NULL );
timePtr = gmtime( %26amp;timet );
printf( " %s\n", asctime(timePtr) );
return 0;
}
Reply:You have to include %26lt;time.h%26gt; and then it's either strftime() or just time() (look up the defs... some take structures)
http://www.cppreference.com/stddate/inde...
Reply:You can join in Linuxforums
http://www.linuxforums.org/forum/linux-p...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment