- 博客(14)
- 收藏
- 关注
原创 Function in Makefile
Function in Makefile Call function $(<function> <argument>) or ${<function> <argument>} example1: $(subst a, b, $(x)) example2: comma := , empty := space := $(empty)$(empty) foo := a b c bar := $(subst $(space), $(comm
2020-06-24 15:46:05
142
原创 Makefile: Introduction to basic
Makefile: Introduction to basic This is a very simple demo about makefile. How does the makefile and make works? edit : main.o kbd.o command.o display.o insert.o search.o files.o utils.o cc -o edit main.o kbd.o command.o display.o insert.o search.o
2020-06-19 00:03:31
147
原创 Easy to Write Markdown File
Markdown Grammar Headers H1 H2 H3 level text 1 # h1 2 # h2 3 # h3 Underline-ish style for H1 and H2. alt-H1 ===== Alt-H1 alt-H2 -------- alt-H2 Emphasis Emphasis, aka italics, with *asterisks* or _underscores_. Strong Emphasis, aka bold, wit
2020-06-04 11:53:48
172
原创 VSCODE C++环境配置与多文件编译
VSCODE C++环境配置 [参考博文] (https://blog.csdn.net/qq_40477151/article/details/103917156) (https://blog.csdn.net/weixin_38260878/article/details/101049070) 放一下我的配置文件 文件中有三个文件c_cpp_properties.json## VSCODE ...
2020-03-26 15:50:42
3369
2
原创 C++之函数返回值
C++之函数返回值 返回行为: 函数返回是,return expression或者 return 语句使程序退出当前函数,返回上一级函数的行为。如果有返回值,函数返回该值。 auto a = fun() ps: 我不了解函数调用和函数返回时,涉及的内存、堆栈等信息。但是想要写好代码,这些是需要了解。(这是我的个人观点,我以后会学这部分的内容) 三种函数返回类型的声明方式 # 正常般(c 风格...
2020-02-20 21:20:42
1101
转载 VSCODE C++环境配置
VSCODE C++环境配置 [参考博文] (https://blog.csdn.net/qq_40477151/article/details/103917156)
2020-01-23 10:24:06
129
原创 c++ string、vector
c++: string、vector 原本不打算将string和vector一起写进博客的,考虑到这是一个笔记,后面也许会整理的。 了解一个类型 在C\C++中,了解一个类型的变量,基本需要经过一下过程。 声明定义一个变量之前,需要#include<…>含有变量类型的库,变量所属的命名的空间。 了解初始化变量的正确方式。 int a{3.14} //warning:丢失部分信息...
2019-12-04 18:19:26
94
原创 C++const 、引用、指针、auto、decltype
C++:const 、引用、指针、auto、decltype const typename & 的两种用法 /* 引用常量,我的理解是引用名绑定常量。引用的值不可更改*/ const int $r1 = 1; const int var = 2; const int &r2 = var; // 使用int &r2 = var 会报错 /* 常量引用,不可以通过应用改变对...
2019-12-04 17:04:29
217
原创 随手笔记 awk, linux数据处理工具
awk基本介绍: 命令格式:awk '条件类型1{操作1} 条件类型2{操作2}...' filename or stdin awk功能: 将接受到的每一行根据FS变量分解成字段处理 处理流程:读第一行,将第一行数据根据字段写入$1,$2...,$0是本行数据 根据条件类型,进行操作 完成操作,下一行读入,重复操作。 note:若FS不是默认值,需要使用BEGIN{FS="分...
2019-11-05 18:01:49
140
原创 随手笔记 printf, linux 格式化输出
printf 使用说明 noting: printf 不是管道命令 获得stdout的字符使用 ‘$’ printf ... $(cat filename) , ‘$(’需要贴近,不能有空格。 printf ‘打印格式’ source 格式说明: \a alarm \b backspace \f form feed 清除屏幕 \n ...
2019-11-04 12:38:04
121
原创 随手笔记 sed , linux 文本处理工具
nl ~/text.txt | sed '2,5d' 在输出中删除2~5行的内容 nl ~/text.txt | sed '2d' 在输出中删除第2行的内容 nl ~/text.txt | sed '2, $d' 在输出中删除2~$(最后)行的内容 nl ~/text.txt | sed '2a drink tea' 在输出中删除2行后加上 drink tead 字符 nl ~/text.txt...
2019-11-04 10:28:13
99
原创 Linux 多进程编程demo
随手记一个Linux多进程的demo, 方便以后自己查看。 /* pthread.c Linux 下多线程demo程序 */ #include<stdio.h> #include<stdlib.h> #include<pthread.h> void thread1(void) { int i=0; for(i=0; i<3; i++...
2019-10-28 22:46:57
178
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人