通用的 C/C++ 庫 qLibc

jopen 12年前發布 | 20K 次閱讀 C/C++開發 C/C++

qLibc 項目的目的就是提供一個通用的 C/C++ 庫,包括所有種類的容器和常用工具函數。

特性:

示例代碼:

// create a hash-table with hash range 100.
// Hash range does NOT mean maximum number of elements. Refer API doc.
qhashtbl_t *tbl = qhashtbl(100);

// add an element which key name is "score".
int x = 12345;
tbl->put(tbl, "score", &x, sizeof(int));

// get the value of the element.
int *px = tbl->get(tbl, "score", NULL, true);
if(px != NULL) {
        printf("%d\n", *px);             
        free(px);
}

// release table
tbl->free(tbl);

項目主頁:http://www.baiduhome.net/lib/view/home/1342602570198

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!