Search:

Type: Posts; User: SeeForever

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    23,473

    For future reference to anyone who might need...

    For future reference to anyone who might need this, I have figured it out:



    time_t now;
    struct tm *current;
    now = time(0);
    current = localtime(&now);
    cout << "hour: " << current->tm_hour <<...
  2. Replies
    3
    Views
    23,473

    So far I have this as a beta: time_t now;...

    So far I have this as a beta:



    time_t now;
    struct tm *current;
    now = time(0);
    current = localtime(&now);
    cout << "hour: " << current->tm_hour << endl;
    cout << "mins: " << current->tm_min...
  3. Replies
    3
    Views
    23,473

    Outputting Current Time in C++

    I was wondering how to output the current time in C++... Specifically, I'd like to print the time in this format:



    02:56:32:231
    //where hh:mm:ss:MMM, hh = hours, mm = mins, ss = seconds, MMM =...
Results 1 to 3 of 20