#include <iostream>
      #include <ctime>
      
      time_t t = time(NULL);
      tm* timePtr = localtime(&t);
      cout << "hours = " << (timePtr->tm_hour) << endl;
      

      Cpp language logoGet current hours

      Codiga's C++ Recipes

      Display the current amount of hours

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.