0 votes
34 views
asked in C++ by

1 Answer

0 votes
answered by

You Can make clock in C++ by using _strtime and also get current date by using _strdate 
 

#include 
#include 

using namespace std;

int main( )
{
    char dateStr [9];
    char timeStr [9];
    _strdate(dateStr);
    cout<< "The current date is  " << dateStr ;
    _strtime( timeStr );
    cout << "\nThe current time is "<



For security sensitive programs, consider using _strtime_s and _strdate_s instead.

Categories

...