S
shan_rish
Hi Group,
I am not able to understand the following code fragement (a return
statement of a function). bsearch is a binary search function and the
(CompareFunction)RnDtsComparitor) parameter is the one which i dont
understand. Any help is appreciated.
//typedefed in a seperate file
typedef int (*CompareFunction)(const void*,const void*);
//Doubt fragement
return (RnDts*) bsearch(&key,
TrffDt.RnDtsDt,
TrffDt.cnt[RNDTCNT],
sizeof(RnDts),
(CompareFunction)RnDtsComparitor);
I dont know if any other information is needed. If needed i will post
the needed information also.
Cheers
Shan
I am not able to understand the following code fragement (a return
statement of a function). bsearch is a binary search function and the
(CompareFunction)RnDtsComparitor) parameter is the one which i dont
understand. Any help is appreciated.
//typedefed in a seperate file
typedef int (*CompareFunction)(const void*,const void*);
//Doubt fragement
return (RnDts*) bsearch(&key,
TrffDt.RnDtsDt,
TrffDt.cnt[RNDTCNT],
sizeof(RnDts),
(CompareFunction)RnDtsComparitor);
I dont know if any other information is needed. If needed i will post
the needed information also.
Cheers
Shan