上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 47 下一页
摘要: 原因:你把inline函数的implementation放到cpp文件里肯定要报这个错误正确的做法:把inline函数的声明和实现都放到header里,例如// declaration:return_type function_name(param_type1, param_type2, ...);... 阅读全文
posted @ 2015-04-27 16:04 rldts 阅读(1499) 评论(0) 推荐(0)
摘要: 一句话:container就用mem_fun,container就用mem_fun_ref参考:http://www.cplusplus.com/reference/functional/mem_fun/http://www.cplusplus.com/reference/functional/me... 阅读全文
posted @ 2015-04-27 08:38 rldts 阅读(350) 评论(0) 推荐(0)
摘要: 在看APUE Figure1.10的时候发现signal(SIGINT, sig_int)这里的sig_int直接用的函数名,但是看Thinking-in-C++ Vol.2的时候发现mem_fun(&Shape::draw)却对函数名进行了取地址操作,感觉有疑问就查了一下资料,下面的代码可以展示出... 阅读全文
posted @ 2015-04-24 16:15 rldts 阅读(944) 评论(0) 推荐(0)
摘要: #include "apue.h"#include static void sig_int(int); /* our signal-catching function */int main(int argc, char *argv[]){ printf("uid = %d, gid = %d\... 阅读全文
posted @ 2015-04-24 12:35 rldts 阅读(1793) 评论(0) 推荐(0)
摘要: 一般写java都用的IDE,今天临时要测试一下JDK安装好没,就用了一下javac,结果各种不会用目录javac -help查到了有javac -sourcepath,他喵的我还以为这是查找sourcefile的选项,结果根本不是javac -sourcepath src com.zj.wksp.H... 阅读全文
posted @ 2015-04-20 20:23 rldts 阅读(381) 评论(0) 推荐(0)
摘要: 刚才看到APUE(高级UNIX环境编程)里面的apue.h中有一行typedef void Sigfunc(int);没搞懂什么意思其实就是定义一个函数指针类型,等价于typedef void (*Sigfunc)(int)参考资料:http://blog.csdn.net/dingyuanpu/a... 阅读全文
posted @ 2015-04-19 13:20 rldts 阅读(996) 评论(0) 推荐(0)
摘要: 参考资料: http://jingyan.baidu.com/article/2fb0ba40541a5900f2ec5f07.html http://zycao.com/virtualbox-ubuntu-vboxsguestadditions.html/comment-page-1 http:/ 阅读全文
posted @ 2015-04-19 12:53 rldts 阅读(938) 评论(0) 推荐(0)
摘要: 今天看书,Thinking in c++ volume 2 "Adaptable function objects"里面作者说:Suppose, for example, that we want to make the function object gt_n, definedearlier in... 阅读全文
posted @ 2015-04-18 14:50 rldts 阅读(6109) 评论(0) 推荐(3)
摘要: 参考资料:http://www.technoreply.com/how-to-install-sublime-text-2-on-ubuntu-12-04-unity/ 1.去Sublime Text官网下载32-bit linux的压缩包 // 64-bit的我反正用不了不知到为什么(报错:bas 阅读全文
posted @ 2015-04-18 00:24 rldts 阅读(494) 评论(0) 推荐(0)
摘要: 2017-11-12更新 安装搜狗拼音: http://blog.csdn.net/iamplane/article/details/70447517 因为IBus在14.04中有些问题(见此随笔:http://www.cnblogs.com/qrlozte/p/5709546.html),所以我改 阅读全文
posted @ 2015-04-17 23:58 rldts 阅读(586) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 47 下一页