User Profile

Collapse

Profile Sidebar

Collapse
progstuff
progstuff
Last Activity: Jan 14 '10, 09:00 PM
Joined: Jan 13 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • progstuff
    replied to question about using ctime
    in C
    sorry that was example code from cplusplus reference... i dont think you read my first post...
    im trying to say, and i quote myself



    The example was the function i was going to use but i dont quite know how to use it...
    i need to refine that code to fit my needs hence the quote.

    i know no matter what function it is i need to use struct tm
    p.s. read the quote...
    See more | Go to post

    Leave a comment:


  • progstuff
    replied to question about using ctime
    in C
    I think i found it. struct tm right?
    Code:
    #include <stdio.h>
    #include <time.h>
    
    int main ()
    {
      time_t rawtime;
      struct tm * timeinfo;
    
      time ( &rawtime );
      timeinfo = localtime ( &rawtime );
      printf ( "Current local time and date: %s", asctime (timeinfo) );
      
      return 0;
    }
    this is a dumb question......
    See more | Go to post

    Leave a comment:


  • progstuff
    started a topic question about using ctime
    in C

    question about using ctime

    How do I use the library ctime to set the current time in: seconds, hours (24 hour), minutes into separate integers.

    And how do i do the same thing with dates setting the current year, day , month into separate integers.

    This is so i can use them to use the integers instead of user input and the user typing in the date themselves.
    In c++.
    See more | Go to post
No activity results to display
Show More
Working...