Hi, what I am having problems with is the “time()” function or my time.h file.
Basically what I am trying to do is separate part of the displayed date “FRI” and just print the separated part. I tried this:
1) char *asctime( const struct tm *time); Did not work. .
2) then char *asctime( const struct tm *time);
Replacing *time with *tm_mday. Referring to the time.h file.
A second question??
below is a small program that I wrote to display the time. The “*/*/” line I put in afterwards and I now get the correct out put. Why do I need this?
time_t tod_y;
*/*/ time(&tod_y);
cout<<ctime(&tod_y)<<endl;
and why do I get the line below when I don’t have that line in?
Wed Dec 31 19:09:35 1969
P.S. I all ways get the above output.