[C++] UTHash使用C++范例 →→→→→进入此内容的聊天室

来自 , 2019-07-24, 写在 C++, 查看 93 次.
URL http://www.code666.cn/view/ce2b9a26
  1.  
  2. #include "uthash.h"
  3.  
  4. struct my_struct {
  5.     int id;            /* we'll use this field as the key */
  6.     char name[10];            
  7.     UT_hash_handle hh; /* makes this structure hashable */
  8. };
  9.  
  10. struct my_struct *users = NULL;
  11.  
  12. void add_user(struct my_struct *s) {
  13.     HASH_ADD_INT( users, id, s );    
  14. }
  15.  
  16.  
  17. //cpp/8956

回复 "UTHash使用C++范例"

这儿你可以回复上面这条便签

captcha