摘要: 内核栈:每个进程保留在内核内存中的内存区域,供(内核)内部函数调用时使用。 用户栈:驻留在不受保护(用户可操作)的用户内存中。 静态区域:static变量和全局变量的生命周期是一样的,从出生到程序结束,二者都放在静态存储区。 栈(stack):先进后出,增长方向是从高地址向低地址增长。作用是局部变量 阅读全文
posted @ 2021-08-05 11:56 补码 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 1 #include<QDebug> 2 3 int sum(int x, int y){ 4 return x+y; 5 } 6 7 int sub(int x, int y){ 8 return x-y; 9 } 10 11 int mul(int x, int y){ 12 return x* 阅读全文
posted @ 2021-08-05 10:37 补码 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 1 class fun 2 { 3 fun(); 4 5 fun& operator=(fun&) = delete; // 不允许=号运算符重载 6 fun(const fun&) = delete; // 不允许拷贝构造 7 } 阅读全文
posted @ 2021-08-05 10:21 补码 阅读(33) 评论(0) 推荐(0) 编辑