search.h的内容摘录
程序中:
[ 本帖最后由 njkido 于 2011-4-6 15:48 编辑 ]
程序代码:
/* Function prototypes */ #ifndef _CRT_ALGO_DEFINED #define _CRT_ALGO_DEFINED #if __STDC_WANT_SECURE_LIB__ _Check_return_ _CRTIMP void * __cdecl bsearch_s(_In_ const void * _Key, _In_bytecount_x_(_NumOfElements * _SizeOfElements) const void * _Base, _In_ rsize_t _NumOfElements, _In_ rsize_t _SizeOfElements, _In_ int (__cdecl * _PtFuncCompare)(void *, const void *, const void *), void * _Context); #endif _Check_return_ _CRTIMP void * __cdecl bsearch(_In_ const void * _Key, _In_bytecount_x_(_NumOfElements * _SizeOfElements) const void * _Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int (__cdecl * _PtFuncCompare)(const void *, const void *)); #if __STDC_WANT_SECURE_LIB__ _CRTIMP void __cdecl qsort_s(_Inout_bytecap_x_(_NumOfElements* _SizeOfElements) void * _Base, _In_ rsize_t _NumOfElements, _In_ rsize_t _SizeOfElements, _In_ int (__cdecl * _PtFuncCompare)(void *, const void *, const void *), void *_Context); #endif _CRTIMP void __cdecl qsort(_Inout_bytecap_x_(_NumOfElements * _SizeOfElements) void * _Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int (__cdecl * _PtFuncCompare)(const void *, const void *)); #endif
程序中:
程序代码:
#ifdef _CRT_ALGO_DEFINED qsort(...); #else MyOwnQsort(...); #endif
[ 本帖最后由 njkido 于 2011-4-6 15:48 编辑 ]