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...
User Profile
Collapse
-
I think i found it. struct tm right?
this is a dumb question......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; }Leave a comment:
-
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++.
No activity results to display
Show More
Leave a comment: