Time function
-
I am wondering how can I create a simple function that will return the current second,minutes and hour in a 3 dimensional int array. I been looking at the information on ctime in windows to see how I could do this but I havent found what I needed. I dont want the function to pause or anything I just want it to simply return the second, minutes and hours.
-
I am wondering how can I create a simple function that will return the current second,minutes and hour in a 3 dimensional int array. I been looking at the information on ctime in windows to see how I could do this but I havent found what I needed. I dont want the function to pause or anything I just want it to simply return the second, minutes and hours.
-
I am wondering how can I create a simple function that will return the current second,minutes and hour in a 3 dimensional int array. I been looking at the information on ctime in windows to see how I could do this but I havent found what I needed. I dont want the function to pause or anything I just want it to simply return the second, minutes and hours.
Supaflyfrank wrote: ...return the current second,minutes and hour in a 3 dimensional int array. What is this? A 3D
int
array looks like:int arr[x][y][z];
How do you propose to fill that up with "second, minutes and hour?"
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
Supaflyfrank wrote: ...return the current second,minutes and hour in a 3 dimensional int array. What is this? A 3D
int
array looks like:int arr[x][y][z];
How do you propose to fill that up with "second, minutes and hour?"
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
int arr[1][1][1];
perhaps... But I can't help to think that a better way to store time is in a structure like this:struct TIME { int m_nSeconds; int m_nMinutes; int m_nHours; };
There probably is a predefined structure like that.A student knows little about a lot. A professor knows a lot about little. I know everything about nothing.
-
int arr[1][1][1];
perhaps... But I can't help to think that a better way to store time is in a structure like this:struct TIME { int m_nSeconds; int m_nMinutes; int m_nHours; };
There probably is a predefined structure like that.A student knows little about a lot. A professor knows a lot about little. I know everything about nothing.
Bob Stanneveld wrote: There probably is a predefined structure like that. Several, actually.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
int arr[1][1][1];
perhaps... But I can't help to think that a better way to store time is in a structure like this:struct TIME { int m_nSeconds; int m_nMinutes; int m_nHours; };
There probably is a predefined structure like that.A student knows little about a lot. A professor knows a lot about little. I know everything about nothing.
I will look in to see if their is any structure already made. But I was more thinking of a array like this: int Time[3]; Time[0] Would be hours Time[1] Would be minutes and Time[2] Would be seconds.