会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
cheshulin
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
下一页
2017年7月23日
list用法详解转载
摘要: http://blog.csdn.net/nupt123456789/article/details/8120397
阅读全文
posted @ 2017-07-23 11:57 cheshulin
阅读(107)
评论(0)
推荐(0)
编辑
list用法详解
摘要: http://blog.csdn.net/nupt123456789/article/details/8120397
阅读全文
posted @ 2017-07-23 11:56 cheshulin
阅读(113)
评论(0)
推荐(0)
编辑
2017年7月22日
list仿函数
摘要: #include using namespace std; typedef struct { char *name; int stuid; int age; }Student; /**************************/ bool cmp(const Student &stua,const Student &stub) { return stua.age>stub.age...
阅读全文
posted @ 2017-07-22 22:04 cheshulin
阅读(98)
评论(0)
推荐(0)
编辑
Vector的仿函数用法
摘要: 一,概述 仿函数(functor),就是使一个类的使用看上去象一个函数。其实现就是类中实现一个operator(),这个类就有了类似函数的行为,就是一个仿函数类了。 有些功能的的代码,会在不同的成员函数中用到,想复用这些代码。 1)公共的函数,可以,这是一个解决方法,不过函数用到的一些变量,就可能成
阅读全文
posted @ 2017-07-22 20:57 cheshulin
阅读(323)
评论(0)
推荐(0)
编辑
2017年6月24日
读取二进制转换为字符串
摘要: #include #include//为了使用exit() int swapInt32(int value) { return ((value & 0x000000FF) > 8) | ((value & 0xFF000000) >> 24) ; } int main() { int a,b; FILE *outFp, *inFp; inFp...
阅读全文
posted @ 2017-06-24 14:43 cheshulin
阅读(600)
评论(0)
推荐(0)
编辑
2017年6月18日
指针数组和数组指针差异
摘要: http://c.biancheng.net/cpp/html/476.html
阅读全文
posted @ 2017-06-18 15:01 cheshulin
阅读(142)
评论(0)
推荐(0)
编辑
二级指针作为函数参数的典型用法
摘要: 用二级指针作为函数参数,有两种典型情况:1、需要传递一级指针的数组时:例如标准C的main函数:int main(int argc, char*[] argv),数组最高维可以退化,char*[] argv等价于char** argv。这里argv代表命令行参数数组。2、需要对传入的一级指针进行修改
阅读全文
posted @ 2017-06-18 11:44 cheshulin
阅读(2280)
评论(0)
推荐(0)
编辑
形参和实参传递函数对比
摘要: #include #include #include "string.h" struct student { int age; char *name;//char name[10]; }; /* 指针传递,省去拷贝时间 */ void stuprint(student *pst) { printf("形参地址%p\r\n",pst); printf("pst...
阅读全文
posted @ 2017-06-18 11:07 cheshulin
阅读(240)
评论(0)
推荐(0)
编辑
数值传递和指针传递0618
摘要: 1 #include 2 #include 3 #include "string.h" 4 /* 数值传递 */ 5 void test1(int **ppint) 6 { 7 int *pint=(int *)malloc(sizeof(int)*100);//为什么在这里会报错 8 ppint=&pint; 9 10 } 11 /* 指针传递 */ ...
阅读全文
posted @ 2017-06-18 10:23 cheshulin
阅读(241)
评论(0)
推荐(0)
编辑
2017年2月28日
stl list
摘要: #include #include #include #include "listEx.h" using namespace std; typedef struct { char name[100]; int age; char address[100]; }STUDENT; typedef list STUDENTLIST; class EventIsIn1...
阅读全文
posted @ 2017-02-28 00:29 cheshulin
阅读(125)
评论(0)
推荐(0)
编辑
上一页
1
2
3
4
下一页
公告