C/C++
king523103
这个作者很懒,什么都没留下…
展开
-
MIPS UBOOT
启动过程:1、msc_spl\board\Pisces\start.S _start工作过程a、Check reset status (第二阶段 忽略)la t0, CPM_RSRlw t1, 0(t0)andi t1, 0x4bnez t1, resume_fro转载 2013-07-25 14:57:06 · 800 阅读 · 0 评论 -
C++的常量
class A { enum { SIZE1 = 100, SIZE2 = 200}; // 枚举常量 int array1[SIZE1]; int array2[SIZE2]; };第一种方法,使用枚举常量class A{ static const int SIZE=100; int array[SIZE]; }第二种方法,使用静态原创 2014-03-11 20:18:54 · 463 阅读 · 0 评论 -
C++ 调用父类同名函数
1、子类和父类函数签名一致,有virtual关键字,根据调用对象类型判断调用的父类还是子类的函数2、子类和父类函数签名一致,没有virtual关键字,父类函数被隐藏,需要使用 父类::函数名 强制调用父类函数3、子类和父类函数参数,函数名一致,返回类型不一样,若没有virtual关键字同2,有virtual关键字会报错转载 2014-03-13 22:08:27 · 9439 阅读 · 0 评论 -
从main函数启动过程说起
先贴代码:#include const int A=10;static int b=30;static char msg[]="hello";int c;static int add(int a,int b){ return a+b;}void printmsg1(int a,int b){ int d= add(a,b); p原创 2015-06-04 15:13:03 · 1533 阅读 · 0 评论 -
动态库生成和使用
先看代码:pop.cextern int stack[512];extern int top;int pop(){ if(top<=0) return; top--; return stack[top];}push.cextern int stack[512];extern int top;原创 2015-06-04 18:07:16 · 528 阅读 · 0 评论