上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 25 下一页

2013年6月18日

c++primer记录(二) 模板

摘要: 因为看得源码里有大量的类模板,所以补充下C++中模板的知识模板:函数模板 类模板 1、p-536 函数模板的类型参数可由编译器进行推断,也可以由用户显式的指定,类模板的类型参数必须显式的给出; p-551 非类型模板实参必须时编译时常量表达式,例: template <int hi, int wid> class Screen{ public: Screen(in... 阅读全文

posted @ 2013-06-18 20:56 阿加 阅读(317) 评论(0) 推荐(0) 编辑

2013年6月17日

why pure virtual function has definition 为什么可以在基类中实现纯虚函数

摘要: 看了会音频,无意搜到一个frameworks/base/include/utils/Flattenable.h : virtual ~Flattenable() = 0;所以查了下“纯虚函数定义实现”,下文讲的非常好:引述自:http://forums.codeguru.com/showthread.php?356281-C-why-pure-virtual-function-has-definition-Please-look-into-sample-code-hereQuestion C++: why pure virtual function has definition?Please 阅读全文

posted @ 2013-06-17 19:30 阿加 阅读(814) 评论(0) 推荐(1) 编辑

2013年6月16日

C++类中静态成员函数

摘要: 引述自《深入探索C++对象模型》2001:5:1版次,p-150static member functions的主要特性就是它没有this指针,所以:1、它不能直接存取其所在class中的nonstatic members;2、它不能够被声明为const、volatile或virtual;3、它不需要经由class object才被调用——虽然大部分时候它是这样被调用的.所有的nonstatic member functions都需要对象的地址(以参数this指出);static member functions(没有this指针)的类型是”函数指针“,而不是”指向member functio 阅读全文

posted @ 2013-06-16 16:05 阿加 阅读(197) 评论(0) 推荐(0) 编辑

2013年6月14日

DDR3

摘要: 阅读全文

posted @ 2013-06-14 22:19 阿加 阅读(120) 评论(0) 推荐(0) 编辑

2013年6月12日

命令模式——示例——程序组织

摘要: #在内核中将生成的目标文件与源文件放在一起,此处将生成的目标文件放在一个目录下,类似于 android的lk目录下的组织。#当头文件更新时,更新cpp文件的时间戳,进而重新生成依赖文件,并执行源文件到目标文件的编译。#tools目录下的depend.sh,可以直接写在Makefile中,但是太长,所... 阅读全文

posted @ 2013-06-12 09:49 阿加 阅读(297) 评论(0) 推荐(0) 编辑

2013年6月11日

命令模式——示例——实现

摘要: //依 CSDN刘伟技术博客,C++命令模式示例如下: 1 // Client.cpp 2 3 #include 4 #include 5 6 #include 7 #include 8 #include 9 10 int main(void)11 {12 //面板13 FBSe... 阅读全文

posted @ 2013-06-11 19:23 阿加 阅读(199) 评论(0) 推荐(0) 编辑

命令模式——示例——数据结构

摘要: 依 CSDN刘伟技术博客,C++命令模式示例如下: 1 // include/Command.h 2 3 #ifndef __COMMAND__ 4 #define __COMMAND__ 5 6 #include <WindowHandler.h> 7 #include <HelpHandler.h> 8 9 //抽象命令类10 class Command 11 {12 public: 1... 阅读全文

posted @ 2013-06-11 19:12 阿加 阅读(271) 评论(0) 推荐(0) 编辑

2013年6月5日

C++函数签名解析

摘要: 2013-11-29实际上不同这么烦锁,直接用objdump -C 或者c++file sourcefile就行了orgmangle首选 1 #! /bin/sh 2 3 elfname=$1 4 objname=$2 5 targetname="" 6 7 thispid=$$ 8 9 filename=/tmp/jerry.${thispid}10 11 rm -f $file... 阅读全文

posted @ 2013-06-05 22:55 阿加 阅读(3221) 评论(0) 推荐(0) 编辑

自动登录服务器 expect

摘要: ssh179 1 #! /usr/bin/expect 2 set timeout 60 3 set host 172.20.106.179 4 set name [lindex $argv 0] 5 set password abc123 6 spawn ssh $name@$host 7 expect { 8 "(yes/no)?" { 9 send "yes\n" 10 ... 阅读全文

posted @ 2013-06-05 22:42 阿加 阅读(190) 评论(0) 推荐(0) 编辑

本地上传服务器

摘要: 1 #! /bin/bash 2 scp -r $1 liuchangcheng@172.20.106.179:~/temp 阅读全文

posted @ 2013-06-05 22:40 阿加 阅读(103) 评论(0) 推荐(0) 编辑

上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 25 下一页

导航