lnlidawei

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

随笔分类 -  cpp

1 2 3 4 5 下一页

cpp语言编程
摘要:[c/cpp]:API和ABI的区别 一、概述 -- API是一种接口,C语言的程序员可以直接调用这类接口(头文件:xx.h); -- ABI是一种协议,像信息的编码和解码的协议(标准/规范),程序员无法直接使用ABI。 二、具体说明 您的理解非常到位!这里用更专业的术语补充说明: -- API(A 阅读全文
posted @ 2025-09-01 15:53 lnlidawei 阅读(12) 评论(0) 推荐(0)

摘要:[c/cpp]:ANSI转义序列(终端显示) 一、说明 ANSI转义序列是一种通过特殊字符序列控制终端显示属性的标准化协议。其核心特征和功能如下: -- 基本结构‌ -- 以ESC字符(ASCII码27)和左方括号[开头 -- 支持三种表示方式: // c_code \033[ // 八进制形式 \ 阅读全文
posted @ 2025-08-25 02:26 lnlidawei 阅读(89) 评论(0) 推荐(0)

摘要:[c/cpp] make学习——特殊变量(自动变量:$@等) 一、环境 [wit@ubuntu:make]$ [wit@ubuntu:make]$ [wit@ubuntu:make]$ uname -snr Linux ubuntu 6.14.0-22-generic [wit@ubuntu:mak 阅读全文
posted @ 2025-08-24 19:53 lnlidawei 阅读(7) 评论(0) 推荐(0)

摘要:【python3】 【regular expression】笔记 一、笔记内容 【问题】: python3 - 【regular expression】 笔记 【回答】 1、 【re.MULTILINE】 模式: -- [^$]从匹配字符串,扩展到匹配‘行’的首位。 -- 即[^$]从匹配“字符串” 阅读全文
posted @ 2025-05-17 16:47 lnlidawei 阅读(40) 评论(0) 推荐(0)

摘要:【GCC】C语言之环境变量配置 一、配置GCC的环境变量 GCC环境变量配置: -- CONFIG: include_path: -- C: C_INCLUDE_PATH=/YOUR/INCLUD/PATH -- C: CPAHT=/YOUR/INCLUD/PATH -- CPP: CPLUS_IN 阅读全文
posted @ 2025-05-09 19:42 lnlidawei 阅读(60) 评论(0) 推荐(0)

摘要:C语言之某个头文件中函数的整理方法 一、头文件中函数的整理方法(stdio.h) 1、 标记: 标记函数的操作对象及操作方法(标记格式:函数名:操作对象:操作方法) -- 标记格式:函数名:操作对象:操作方法 -- fopen:file:open -- ftell:file:pos -- feof: 阅读全文
posted @ 2025-05-08 02:43 lnlidawei 阅读(12) 评论(0) 推荐(0)

摘要:[c/cpp] union - 成员变量在内存中的起始地址相同 一、说明: 1、union成员变量在内存中的起始地址相同 二、代码 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 5 6 void msg() { 阅读全文
posted @ 2024-12-07 13:45 lnlidawei 阅读(13) 评论(0) 推荐(0)

摘要:【asm/c/cpp】:时间单位换算(秒) 一、秒的单位: 1、 second(秒:s) 2、 microsecond(微秒:ms): 1 second = 1000 microseconds (1s = 103 ms) 3、 millisecond(毫秒:μs): 1 second = 10000 阅读全文
posted @ 2024-11-29 06:43 lnlidawei 阅读(108) 评论(0) 推荐(0)

摘要:[c/cpp]: user stack - test 1. code 1 #include <cstdio> 2 3 4 #define STACKSIZE 100 5 6 7 struct stack { 8 int index; 9 int e[STACKSIZE]; 10 }; 11 12 1 阅读全文
posted @ 2024-11-18 07:06 lnlidawei 阅读(9) 评论(0) 推荐(0)

摘要:[asm/c/cpp]: function syscall() 1. syscall() - docs [root@rocky:src]# cat syscall.txt syscall(2) System Calls Manual syscall(2) NAME syscall - indirec 阅读全文
posted @ 2024-11-18 04:16 lnlidawei 阅读(56) 评论(0) 推荐(0)

摘要:[c/cpp]:数据结构:表格实现(table) 一、程序代码 1 /* 2 * table { 3 * id value 4 * record[0].id record[0].value 5 * record[1].id record[1].value 6 * record[2].id recor 阅读全文
posted @ 2024-11-15 02:24 lnlidawei 阅读(52) 评论(0) 推荐(0)

摘要:[c/cpp]:指针的区别:【 int *px[3] 和 int (*pa)[3] 】 一、程序代码 1 #include <iostream> 2 3 4 int msg() 5 { 6 int x[3] = {1,2,3}; 7 8 int xx[4][3] = { 9 {1,2,3}, 10 阅读全文
posted @ 2024-11-15 00:24 lnlidawei 阅读(21) 评论(0) 推荐(0)

摘要:[c/cpp]:模板指针 一、程序代码 1 #include <iostream> 2 3 4 int msg(int x) 5 { 6 std::cout <<"\t[msg]#\t x := "<< x << std::endl; 7 return x; 8 } 9 10 11 // gener 阅读全文
posted @ 2024-11-14 20:11 lnlidawei 阅读(11) 评论(0) 推荐(0)

摘要:[c/cpp]:递归算法:汉诺塔问题代码 一、代码 1 #include <iostream> 2 3 4 using namespace std; 5 6 7 // plate_numbers=n; 8 // from_stick=from; 9 // target_stick=to; 10 // 阅读全文
posted @ 2024-11-08 05:53 lnlidawei 阅读(54) 评论(0) 推荐(0)

摘要:[c/cpp]:字母大小写转换 一、代码 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 5 6 char ip1[] = "01234567890AbcDEf"; 7 char ip2[] = "01234567890 阅读全文
posted @ 2024-11-03 07:08 lnlidawei 阅读(50) 评论(0) 推荐(0)

摘要:[c/cpp]:字符计数和文本行计数 一、代码 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 5 6 char input[] = "1\n2\n3\n"; 7 8 9 // string_length = strin 阅读全文
posted @ 2024-11-03 06:45 lnlidawei 阅读(23) 评论(0) 推荐(0)

摘要:[c/cpp]:函数指针数组的应用(模拟系统调用) 一、说明 1、 函数指针数组: 一个指针数组,它的元素是函数指针;函数指针数组。 二、程序代码 1 [root@rocky:test]# cat syscalls.c 2 #include <stdio.h> 3 #include <stdlib. 阅读全文
posted @ 2024-11-01 02:38 lnlidawei 阅读(15) 评论(0) 推荐(0)

摘要:[c/cpp]:指向函数的指针数组(函数指针的数组) 〇、说明: 1、 函数指针: 一个指针,它指向一个函数。 2、 函数指针数组: 一个指针数组,它的元素是函数指针。 一、程序代码 1 [root@rocky:test]# cat test.c 2 #include <stdio.h> 3 #in 阅读全文
posted @ 2024-11-01 01:51 lnlidawei 阅读(12) 评论(0) 推荐(0)

摘要:[cpp]: template的基本元素:概念和要求 一、template 基本概念 1.、概念(concept): 概念的功能,对template中的参数(T/E)进行约束/限制。‘概念(concept)’,是一组‘要求(requirements)’的集合。 2、要求(requirements): 阅读全文
posted @ 2024-10-23 02:46 lnlidawei 阅读(86) 评论(0) 推荐(0)

摘要:cpp:指针转化(百度AI:static_cast/dynamic_cast/const_cast/reinterpret_cast) 一、 c++ 指针转化概述: 在C++中,指针转换主要包括静态转换、动态转换、常量转换和重新解释转换四种类型。‌ ‌1、 静态转换(static_cast)‌: - 阅读全文
posted @ 2024-10-19 19:03 lnlidawei 阅读(60) 评论(0) 推荐(0)

1 2 3 4 5 下一页