
c语言
salman_tan
这个作者很懒,什么都没留下…
展开
-
c语言函数参数++自增--自减情况分析(一)
c语言函数参数自增自减情况分析(一)上代码:void hahaha( int i, int * k){ printf("%d\n", i); printf("%d\n", i); printf("%d\n", *k);}int main(){ int hh = 1; hahaha(hh++, &hh)原创 2019-01-09 18:19:30 · 1788 阅读 · 0 评论 -
c语言函数参数++自增--自减情况分析(二)c++中的list之erase操作
c++中的list之erase操作正确的代码:void listRelease(aList_t *naList){ aList_t ::iterator iter; for (iter = naList->begin(); iter != naList->end(); ) { LOGD_INFO << "re...原创 2019-01-10 10:30:52 · 540 阅读 · 0 评论 -
c/c++中位与运算&代替取模运算%
c/c++中位与运算&代替取模运算%取模运算所需的时间大约是位与运算的十倍。当模的大小是2的N次方时,可用位与运算代替取模运算:unsigned int modNum = 1024; // 2的N次方unsigned int x = 4321;unsigned int a = x % modNum;unsigned int b = x & (modNum - 1);...原创 2019-02-12 17:31:31 · 1740 阅读 · 0 评论