lnlidawei

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

2024年1月12日

摘要: [cpp]: concept --<template> 一、说明 1、concept 定义一个‘概念’并且命名为‘C’;‘C’是一组“模板参数T”的限制条件。概念‘C’的涵义:只有满足限制条件‘C’的模板参数T,源文程序才能通过编译。 2、代码示例 1 // 定义概念“C1” 2 3 templat 阅读全文
posted @ 2024-01-12 11:18 lnlidawei 阅读(12) 评论(0) 推荐(0) 编辑

2024年1月11日

摘要: [cpp]: <fstream> - read_from_file 一、介绍 1、介绍:从文件【big.cpp】读取内容,然后将【读取内容】输出到【屏幕】。 2、主程序源文件:iotest.cpp 3、被读取的文件:big.cpp 二、源代码 1、主程序源代码:iotest.cpp 1 /* fil 阅读全文
posted @ 2024-01-11 06:08 lnlidawei 阅读(12) 评论(0) 推荐(0) 编辑

摘要: 哲学:想和做(“理论”必须作用域“实现”) 想和做。理论和实现。 想、理论,都是“思维”活动,“虚拟”行为;做、实现,都是“实践”活动,“真实”行为。虚拟行为,指“行为”没有改变客观世界;真实行为,指“行为”改变了客观世界。 理论、想,在“虚拟环境”中,构建一条在现实环境中实现目标的可行路径。理论、 阅读全文
posted @ 2024-01-11 01:43 lnlidawei 阅读(5) 评论(0) 推荐(0) 编辑

摘要: [cpp]: class/struct -- 初始化‘实例对象’ 一、说明 1、编译标准: std = c++20 2、编译语句: g++ -std=c++20 -O2 -Wall -pedantic -pthread main.cpp && ./a.out 二、class/struct(初始化‘实 阅读全文
posted @ 2024-01-11 00:47 lnlidawei 阅读(6) 评论(0) 推荐(0) 编辑

2024年1月10日

摘要: [cpp]: 获取“实例对象”--template 编程 一、代码 1 #include <iostream> 2 #include <string> 3 4 5 using namespace std; 6 7 8 class base { }; 9 10 11 class work:base { 阅读全文
posted @ 2024-01-10 04:26 lnlidawei 阅读(5) 评论(0) 推荐(0) 编辑

摘要: device: 设备模拟 -- (电脑->手机) 一、电脑浏览器(chrome)模拟手机 1、配置:选择【chrome浏览器图标】,右击鼠标,选择【“属性” -> “short cut” -> “target”】,在【target】内输入代码(代码的红色部分): [ C:\Users\Adminis 阅读全文
posted @ 2024-01-10 02:06 lnlidawei 阅读(11) 评论(0) 推荐(0) 编辑

2024年1月9日

摘要: cpp: 指针数组和数组指针 一、基本概念 1、指针数组 1.1、指针数组:指针数组是以指针为元素的数组;指针数组是一个数组;指针数组的元素是指针。 1.2、定义: int *pt[10]; // pt是数组,包含10个整型指针元素; 2、数组指针 2.1、数组指针:数组指针是指向数组的指针;数组指 阅读全文
posted @ 2024-01-09 23:05 lnlidawei 阅读(31) 评论(0) 推荐(0) 编辑

2024年1月8日

摘要: cpp: compiler -- 玩具 一、compiler 构思 1、a56爆大奖在线娱乐读取:“编译器”,读取“源程序a56爆大奖在线娱乐(xx.txt)”; 2、词法分析:“编译器”,将“xx.txt”分解成“字符串”; 3、语法/语义分析:“编译器”,检验“字符串”的语法规则;解析并且赋予“字符串”的语义属性; 4、翻译1 阅读全文
posted @ 2024-01-08 22:47 lnlidawei 阅读(7) 评论(0) 推荐(0) 编辑

2024年1月6日

摘要: cpp: namespace -- (不同头文件的命名空间,具有相同名称) 一、说明: 1、探索:在多个头文件中,定义相同名称的命名空间。 二、代码 1 // first.cpp 2 #include <iostream> 3 #include <string> 4 #include "first. 阅读全文
posted @ 2024-01-06 06:10 lnlidawei 阅读(29) 评论(0) 推荐(0) 编辑

2024年1月5日

摘要: cpp: shell.cpp -- (bugs) 一、原理 1、实现原理: 无限循环 + 标准输入(等待输入状态...); 二、代码 1 [wit@fedora tmp]$ cat shell.cpp 2 #include <iostream> 3 #include <string> 4 5 usi 阅读全文
posted @ 2024-01-05 02:38 lnlidawei 阅读(16) 评论(0) 推荐(0) 编辑

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