![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c语言基础类
何大草
这个作者很懒,什么都没留下…
展开
-
测试回调函数
#if 1#includetypedef void (*MYFUN)(void *);void (*ptrFunc)(void *)=NULL;void myTest(MYFUN f){ ptrFunc = f;}void repeat_three_times(MYFUN f, void *para){ f(para); f(para); f(para);}void say_hello(void原创 2014-07-23 15:02:23 · 1223 阅读 · 0 评论 -
C++虚函数与函数重载理解分析
虚函数构建多态,函数重载tongg原创 2014-08-12 09:47:42 · 523 阅读 · 0 评论 -
c++ const
1.常量指针与指针常量常量指针是针对于普通指针而言,语义在于指向常量的指针; 定义: const *<_name>; 常量指针解引用无法对引用值进行改变,但是可以改变指针自己的值; example: int tmp = 0, tmp2 = 1; const int *p = &tmp; p = &tmp2; // ok *p = 1;//error 指针常量语义原创 2016-12-07 10:45:30 · 281 阅读 · 0 评论 -
动态数组
问题前段时间移植linux到windows(vs2013),如下代码: int len = 10; char tmp[len]; 编译出错,但在gcc编译是成功的。原因在于vs2013默认不开启对c99标准的支持,c99标准开始支持动态数组;修改代码或者修改vs2013支持c99;原创 2016-12-07 10:46:59 · 337 阅读 · 0 评论