I'm trying to return the current Time using this class function, but it's not working. Any suggestions?
Code:#include <iostream> #include <ctime> using namespace std; class Time { public: time_t currentTime; time( ¤tTime ); void printTime() { cout << asctime( localtime( ¤tTime)); } }; int main() { Time t; t.printTime(); return 0; }