BSEARCH
Section: Linux Programmer's Manual
(3)
Updated: March 29, 1993
Index
Return to Main Contents
À̸§
bsearch - Á¤·ÄµÈ ¹è¿ÀÇ ÀÌÁø Ž»ö
»ç¿ë¹ý
#include <stdlib.h>
void *bsearch(const void *key, const void *base, size_t nmemb,
- size_t size, int (*compar)(const void *, const void *));
¼³¸í
bsearch() ÇÔ¼ö´Â nmemb ¿ÀºêÁ§Æ®ÀÇ ¾î·¹À̸¦ ã´Â´Ù,
±×°ÍÀÇ ÃÖÃÊ ±¸¼ºÀº key·Î ÁöÁ¤µÈ ¿ÀºêÁ§Æ®¿¡ ÇØ´çÇÏ´Â ±¸¼ºÀ¸·Î, base¿¡
ÀÇÇØ ÁöÁ¤µÈ´Ù. °¢ ¾î·¹ÀÌ ±¸¼ºÀÇ Å©±â´Â size·Î ÁöÁ¤µÈ´Ù.
¾î·¹ÀÌÀÇ ³»¿ëÀº compar¿Í °ü·ÃµÈ ºñ±³ ±â´ÉÀ» ÀÌ¿ëÇÏ¿© »ó¹æÁ¤·Ä µÇ¾î¾ßÇÑ´Ù.
compar ·çƾÀº key¸¦ ÁöÁ¤ÇÏ´Â °Í°ú ¾î·¹ÀÌÀÇ ±¸¼ºÀ» ÁöÁ¤ÇÏ´Â
µÎ°³ÀÇ º¯¼ö¸¦ °¡Áø´Ù. ±×¸®°í ÀÌ°ÍÀºkey¿ÀºêÁ§Æ®°¡ ã¾ÆÁö¸é
0º¸´Ù À۰ųª Å« Á¤¼ö¸¦ ¹ÝȯÇØ¾ß ÇÑ´Ù.
¹Ýȯ°ª
bsearch() ÇÔ¼ö´Â ¾î·¹ÀÌ¿¡¼ ¸Â´Â ±¸¼º ¿ä¼Ò¸¦ Àæ¾Æ ±× Æ÷ÀÎÅ͸¦
¹ÝȯÇÑ´Ù. ¸¸¾à ¸Â´Â°Ô ¾ø´Ù¸é ³ÎÀ» ¹ÝȯÇÑ´Ù. Å°¿¡ ÇØ´çÇÏ´Â ±¸¼º¿ä¼Ò°¡ ¿©·¯ °³
ÀÖ´Ù¸é, ¹ÝȯµÇ´Â ¿ä¼Ò´Â Ưº°È÷ ÁöÁ¤µÇÁö ¾Ê´Â´Ù.
ȣȯ
SVID 3, BSD 4.3, ISO 9899
°ü·Ã Ç׸ñ
qsort(3)
Index
- À̸§
-
- »ç¿ë¹ý
-
- ¼³¸í
-
- ¹Ýȯ°ª
-
- ȣȯ
-
- °ü·Ã Ç׸ñ
-
This document was created by
man2html,
using the manual pages.
Time: 08:07:01 GMT, March 25, 2004