![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C
ɴᴏʀɪɴsᴀɴᴇ
努力学习,努力赚钱
展开
-
理解typename的两个含义
原文地址:http://dev.yesky.com/13/2221013.shtml问题:在下面的 template declarations(模板声明)中 class 和 typename 有什么不同? template class Widget; // uses "class"template class Widget; // uses "typename"转载 2017-10-18 10:05:03 · 264 阅读 · 0 评论 -
函数指针作为某个函数的参数及定义函数指针
原文地址:http://blog.csdn.net/vlily/article/details/7244682一、 定义某一函数的指针类型:就像自定义数据类型一样,我们也可以先定义一个函数指针类型,然后再用这个类型来申明函数指针变量。我先给你一个自定义数据类型的例子。typedef int* PINT; //为int* 类型定义了一个PINT的别名int main()转载 2017-10-18 14:05:15 · 1486 阅读 · 0 评论 -
可变长结构体
在Linux系统里,/usr/include/linux/if_pppox.h里面有这样一个结构:struct pppoe_tag { __u16 tag_type; __u16 tag_len; char tag_data[0];} __attribute ((packed));最后一个成员为可变长的数组,对于TLV(Type-L转载 2017-10-20 13:31:14 · 1142 阅读 · 0 评论