![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言
特特特特特特特
这个作者很懒,什么都没留下…
展开
-
leetcode中uthash的使用
学习了:https://blog.csdn.net/whatday/article/details/95926766 流程: 1、创建uthash结构体 typedef struct { char Name[64]; char Time[10000]; int Nums; UT_hash_handle hh; } TweetCounts; key值是Name,一定要放在结构体的第一个,value值是整个结构体。它的原理是通过key值找到相应的结构体,因此就产生了,原创 2021-08-09 00:10:49 · 752 阅读 · 0 评论 -
C语言整数溢出
uint8_t port = 0x5aU ; uint8_t result_8 ; result_8 = (~port) > > 4 ; 首先搞清楚 uint_8t是啥,typedef unsigned char uint8_t;由于机器用的是32位的机器,因此port取反后的值是fffffa5.移位后得不到自己想要的结果。而我们需要在取反后取后8位,因此可以取反后强转后移位。:((uint8_t)(~port))>>4; ...原创 2020-05-29 21:35:43 · 531 阅读 · 0 评论