Mega Code Archive
Categories
/
C++ Tutorial
/
Data Types
Demonstrating the use of the ctime( ) function
#include
#include
using namespace std; time_t longtime; int main( ) { time(&longtime); cout << "The time and date are " << ctime(&longtime) << "\n"; return (0); }