File tree Expand file tree Collapse file tree 2 files changed +28
-17
lines changed Expand file tree Collapse file tree 2 files changed +28
-17
lines changed Original file line number Diff line number Diff line change 1
- SORT_TARGET =./sorting/QuickSort.cpp
2
- SORT_LIB =./sorting/lib/DoubleVector.cpp
1
+ TARGET =./sorting/QuickSort.cpp
2
+ LIB =./sorting/lib/DoubleVector.cpp
3
3
4
- compileSorting :
5
- g++ ${SORT_TARGET} ${SORT_LIB}
4
+ # 编译源文件
5
+ compile :
6
+ # Compile
7
+ g++ ${TARGET} ${LIB}
6
8
7
- runSorting :
8
- ./sorting/a.out
9
+ # 运行编译后的可执行文件
10
+ run : compile
11
+ # Run
12
+ ./a.out
13
+
14
+ # 删除可执行文件
15
+ clean :
16
+ # Clean
17
+ rm -rf * .out
Original file line number Diff line number Diff line change 1
1
# C++ 算法
2
- > 参考 [ C-Plus-Plus ] ( https://github.com/TheAlgorithms/C-Plus-Plus ) 库,但代码稍有不同,主要用于练手所用
2
+ > 本项目参考多种语言算法实现,并根据自己的理解进行C++的实现
3
3
4
4
## 项目导览
5
- - [ 排序算法] ( ./sorting/README.md )
6
- - other
5
+ - 猛戳 👉 [ 排序算法] ( ./sorting/README.md )
6
+ - Other
7
7
8
8
## Run
9
+ > 以[ sorting/QuickSort.cpp] ( ./sorting/QuickSort.cpp ) 文件为例运行步骤如下:
9
10
10
- ### 以 [ QuickSort.cpp ] ( ./sorting/QuickSort.cpp ) 文件为例运行步骤如下:
11
- 1 . 进入对应目录 ` cd sorting `
12
- 2 . 编译cpp文件 ` g++ QuickSort.cpp ./lib/DoubleVector .cpp ` ,默认会输出 ` a.out ` 文件 (具体命令视情况而定)
13
- 3 . 执行编译后的文件 ` ./a.out `
11
+ ### Normal Run
12
+ - Enter target directory ` cd sorting `
13
+ - Compile ` g++ QuickSort.cpp ./lib/QuickSort .cpp ` ,默认会输出 ` a.out ` 文件 (具体命令视情况而定)
14
+ - Run ` ./a.out `
14
15
15
- ## Fast Run
16
- ### 以[ QuickSort.cpp] ( ./sorting/QuickSort.cpp ) 文件为例运行步骤如下:
17
- 1 . Compile ` make compileSorting TARGET=./sorting/QuickSort.cpp `
18
- 2 . Run ` make runSorting `
16
+ ### Fast Run
17
+ - Compile & Run ` make run ./sorting/QuickSort.cpp `
18
+
19
+ ## Reference Link
20
+ - [ C-Plus-Plus] ( https://github.com/TheAlgorithms/C-Plus-Plus )
You can’t perform that action at this time.
0 commit comments