随笔分类 -  C,C++

摘要:#include <stdio.h> #include "math.h" #include "stdlib.h" #include "unistd.h" int main(void) { int h, line, t; scanf("%i", &h); for (int v = h - 1; v > 阅读全文
posted @ 2023-03-20 23:44 ascertain 阅读(10) 评论(0) 推荐(0) 编辑
摘要:开发的时候碰到如下的错误(PHP-FPM+apache),所以想好好理解下Segmentation fault. 参考了文章 Segmentation fault到底是何方妖孽 维基百科的解释如下: 存储器区块错误(英语:Segmentation fault,经常被缩写为segfault),又译为存 阅读全文
posted @ 2020-11-23 19:20 ascertain 阅读(3614) 评论(0) 推荐(0) 编辑
摘要:字节序不是由操作系统决定的,而是由cpu架构决定的,比如 x86 的是 little endian,而 PPC (PowerPC) 是big endian。 所以跑在 x86 上的 linux/windows 都是小端,而跑在 PPC 上的linux则是大端。 (PS: 实际上 PowerPC 是即 阅读全文
posted @ 2020-09-28 15:42 ascertain 阅读(1345) 评论(0) 推荐(0) 编辑
摘要:glibc是gnu发布的libc库,也即c运行库。glibc是linux 系统中最底层的api(应用程序开发接口),几乎其它任何的运行库都会倚赖于glibc。glibc除了封装linux操作系统所提供的系统服务外,它本 身也提供了许多其它一些必要功能服务的实现,主要的如下: (1)string,字符 阅读全文
posted @ 2020-08-17 13:48 ascertain 阅读(17471) 评论(0) 推荐(0) 编辑
摘要:添加库文件路径: 1:导出环境变量 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/new_path 2:修改配置文件 ld.so.conf ld.so.conf.d/* LIBRARY_PATH 程序编译期间查找动态链接库时指定的查找路径,编译期,开发阶段, 只影 阅读全文
posted @ 2020-07-08 01:41 ascertain 阅读(537) 评论(0) 推荐(0) 编辑
摘要:1 #include "stdio.h" 2 #include "stdlib.h" 3 #include "time.h" 4 #define random(x) (rand()%x) 5 6 int main () 7 { 8 int m,l,p,q; 9 printf("输入第一个矩阵的维数m 阅读全文
posted @ 2020-07-08 01:28 ascertain 阅读(1613) 评论(0) 推荐(0) 编辑
摘要:autoreconf: autoreconf -ifv --install copy missing auxiliary files --force consider all files obsolete tarball中一般会有boostrap.sh或autogen.sh,其会调用autoreco 阅读全文
posted @ 2020-06-27 16:51 ascertain 阅读(186) 评论(0) 推荐(0) 编辑
摘要:编译c的时候出现这个错误,应该是不小心切换到中文全角输入,导致错误 cat --show-all main.c进行查看 图中蓝色是一些奇怪的全角符号 阅读全文
posted @ 2020-06-11 17:32 ascertain 阅读(467) 评论(0) 推荐(0) 编辑
摘要:./configure 是源码包自带的脚本 安装前需要检测系统环境是否符合安装要求 定义选项,./configure --help查看 把系统环境的检测结果和定义好的功能选项写入Makefile文件,后续make和make install依据此文件进行 make make调用gcc编译器,读取Mak 阅读全文
posted @ 2020-06-09 19:26 ascertain 阅读(251) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示