lnlidawei

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 2 3 4 5 6 7 8 9 ··· 39 下一页

2024年1月25日

摘要: [cpp]: 【字符】和【ascii值】之间的转换 一、基础: 1、将【字符】转化为【ascii值】( char -> int ): 1 char c = '-' ; 2 3 // char -> int 4 int c_out = int(c) ; 2、将【ascii值】转化为【字符】( int 阅读全文
posted @ 2024-01-25 03:27 lnlidawei 阅读(56) 评论(0) 推荐(0) 编辑

摘要: [c][cpp]: c和cpp的命名规则(变量、函数、类、结构、枚举、共用) 一、说明:为了更好识别变量、函数、类、结构体,因此制定命名规则 1、全局变量的命名规则: g_<变量名> 2、函数的命名规则: f_<函数名> 3、【class(类)】的命名规则: c_<类名> 4.1、类的成员变量的命名 阅读全文
posted @ 2024-01-25 01:18 lnlidawei 阅读(68) 评论(0) 推荐(0) 编辑

2024年1月24日

摘要: [os]: Linux 【系统调用】的编号 一、基本说明 1、操作系统:fedora38 2、【系统调用的编号】所在路径和名称: [ /usr/include/asm-generic/unistd.h ] 二、系统调用编号的源码【文件路径和名称: /usr/include/asm-generic/u 阅读全文
posted @ 2024-01-24 00:41 lnlidawei 阅读(86) 评论(0) 推荐(0) 编辑

2024年1月22日

摘要: [cpp][data_structure]: queue -- user defined( bug ) 一、示意 二、源代码中存在的问题 1、 有问题;在pop()中front指针设置有问题。 三、源码 1 #include <iostream> 2 #include <string> 3 4 5 阅读全文
posted @ 2024-01-22 03:14 lnlidawei 阅读(7) 评论(0) 推荐(0) 编辑

2024年1月19日

摘要: [c][cpp]: c(cpp) connect to MariaDB -- (Codes) 一、注意事项 1、操作系统: 【 fedora38 】 2、c/cpp 连接 MariaDB数据库,需要使用额外的文件。 3、头文件【 /usr/include/mysql/mysql.h 】:mysql. 阅读全文
posted @ 2024-01-19 08:06 lnlidawei 阅读(9) 评论(0) 推荐(0) 编辑

摘要: [c][cpp]: C/Cpp connector for MariaDB 一、必要说明 1、【 操作系统 】: 【 fedoral38 】 2、【 mysql.h 】文件位置: 【 /usr/include/mysql/mysql.h 】 二、相关文档 1、 C & C++ Connectors 阅读全文
posted @ 2024-01-19 07:07 lnlidawei 阅读(10) 评论(0) 推荐(0) 编辑

2024年1月18日

摘要: [c]: 语言环境设置 -- setlocale() 一、语言环境设置【 Linux - Fedora 】 1、【Linux -- 类redhat 】语言环境设置 1.1、查看语言环境【/etc/locale.conf】:/etc/locale.conf 2、【Linux -- 类debian 】语 阅读全文
posted @ 2024-01-18 22:52 lnlidawei 阅读(30) 评论(0) 推荐(0) 编辑

摘要: [c][cpp]: decimal to binary 一、源码 1 #include <stdio.h> 2 3 4 // decimal to binary; 10 -> 2 5 void dec2bin(long int num) 6 { 7 int res[1000]; 8 9 long i 阅读全文
posted @ 2024-01-18 14:48 lnlidawei 阅读(10) 评论(0) 推荐(0) 编辑

2024年1月17日

摘要: [cpp]: 好玩的“宏定义(macro)” 一、有趣的“宏定义” 1、思想/原理:用【宏macro】,定义【伪指令directive】。 2、命令格式: #define [directive_name] [function or ...] 3、应用实例: 1 // directive entry 阅读全文
posted @ 2024-01-17 00:55 lnlidawei 阅读(15) 评论(0) 推荐(0) 编辑

2024年1月16日

摘要: [asm]: GNU Binutils: <as><ld/linker> 1. websites: 1.1 [all] https://sourceware.org/binutils/ 1.2 [docs] https://sourceware.org/binutils/docs/ 3. refer 阅读全文
posted @ 2024-01-16 22:44 lnlidawei 阅读(6) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 39 下一页