|
-
March 17th, 2002, 05:58 PM
#1
qsort question, urgent!
Can someone help me with qsort problem, I would like to use the inbuilt qsort function? I have a struct like this:
typedef struct{
int hours;
int minutes;
int seconds;
}Times;
I have calculated the times in a global struct table
Times TotalTimes[10];
How do I sort them by checking first hours, then minutes and finally seconds?
All values are given as two-digit decimal numbers.
Please help me out, I tried several different cases but I can't sort all numbers (hours, mins, secs) correctly.
I think the syntax of qsort is something like:
qsort(inputArray,numberOfCharsToCompare
,charTableLength,strcmp);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|