上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 112 下一页
摘要: int func(int a, int b = 3) { return a + b; } int main() { int c = func(2); cout << "c: " << c << endl; return 0; }c: 5 阅读全文
posted @ 2022-03-06 21:32 thomas_blog 阅读(29) 评论(0) 推荐(0)
摘要: int& func() { static int a = 10; return a; } int main() { int &a = func(); cout << "a: " << a << endl; func() = 20; /* 如果函数返回值是引用,这个函数调用可以作为左值 */ cout 阅读全文
posted @ 2022-03-06 21:21 thomas_blog 阅读(44) 评论(0) 推荐(0)
摘要: int main() { int a = 10; //int &b; /* 引用必须初始化 */ int &b = a; /* 一旦初始化,不可更改 */ int c = 12; b = 12; /* 赋值 */ cout << "a: " << a << endl; cout << "b: " < 阅读全文
posted @ 2022-03-06 21:02 thomas_blog 阅读(36) 评论(0) 推荐(0)
摘要: 代码区 存放函数体的二进制代码,由操作系统进行管理。 代码区是共享的,对于频繁执行的程序,只需要在内存中有一份代码即可 代码区是只读的,防止程序意外修改 全局区 存放全局变量、静态变量以及常量 栈区 由编译器自动分配释放,存放函数的参数值和局部变量等 堆区 由程序员分配和释放 阅读全文
posted @ 2022-03-06 21:00 thomas_blog 阅读(144) 评论(0) 推荐(0)
摘要: 注:const右侧靠近指针还是常量,是指针就是常量指针,是常量就是指针常量。 阅读全文
posted @ 2022-03-06 17:25 thomas_blog 阅读(106) 评论(0) 推荐(0)
摘要: 配置core文件生成 # ulimit -c unlimited # echo "/var/core-%e-%p-%t" > /proc/sys/kernel/core_pattern # cat /proc/sys/kernel/core_pattern /var/core-%e-%p-%t 生成 阅读全文
posted @ 2021-11-16 16:55 thomas_blog 阅读(765) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> int main() { char *str = "hello"; strcpy(str, "furong"); return 0; } 产生core文件 gcc dump.c -g 开启core dump功能 ulimi 阅读全文
posted @ 2021-11-15 19:41 thomas_blog 阅读(584) 评论(0) 推荐(0)
摘要: server { # 端口号 listen 3309; # IP server_name 192.168.1.3; location / { # 执行目录 root /var/www/vue-app-base/dist/; index index.html; # index index.html i 阅读全文
posted @ 2021-08-13 15:03 thomas_blog 阅读(531) 评论(0) 推荐(0)
摘要: https://www.byjth.com/tools/29.html 阅读全文
posted @ 2021-07-29 18:17 thomas_blog 阅读(34) 评论(0) 推荐(0)
摘要: 两种方式 System.load("/home/pi/jni/libA.so"); System.loadLibrary("A"); loadLibrary需要指定java.library.path动态库路径 阅读全文
posted @ 2021-07-28 14:07 thomas_blog 阅读(421) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 112 下一页