C/C++
记录日常C/C++的学习笔记
栐木
这个作者很懒,什么都没留下…
展开
-
C\C++小知识
记录C\C++中的一些小知识点原创 2022-06-16 19:12:12 · 194 阅读 · 0 评论 -
C++快速排序
#include <iostream> using namespace std; void fast_sort(int *input, int left, int right) { if (left >= right) { return; } // from lower to higher int base = input[left]; int i = left; int j = right; int tmp;原创 2021-12-21 16:43:05 · 616 阅读 · 0 评论 -
cmake学习
参考资料 https://www.hahack.com/codes/cmake/ https://github.com/wzpan/cmake-demo Demo cmake_minimum_required(VERSION 3.14) # 最低版本要求 project (Test) # 项目名称 SET(CMAKE_C_COMPILER g++) # 设置编译器为g++或者gcc,可以用默认 add_compile_options(-std=c++11) # 设置编译器的原创 2021-12-16 15:07:58 · 89 阅读 · 0 评论 -
Makefile 简单使用教程
需求为以下的结构写一个Makefile project └───include │ │ test1.h │ │ test2.h └───src │ │ test1.cpp │ │ test2.cpp └───obj │ │ 存放目标文件 └───Makefile 按照 Makefile 规则规规矩矩的写: all: test test: obj/test1.o obj/test2.o g++ -o test obj/test1.o obj/test2.o原创 2020-06-22 18:55:13 · 2491 阅读 · 0 评论