Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b1744c2

Browse files
committed
Merge branch 'master' of github.com:yourtion/LearningMasteringAlgorithms-C
2 parents acb655e + c1b210d commit b1744c2

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

‎README.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# 《算法精解:C语言描述》源码及Xcode工程、Linux工程
22

3-
打开 `MasteringAlgorithms.xcodeproj` 即可。`Algorithms.xcodeproj` 为算法库文件工程
3+
Mac 下使用 Xcode 打开 `MasteringAlgorithms.xcodeproj` 即可。`Algorithms.xcodeproj` 为算法库文件工程。每个 Example 都是单独的运行文件。
4+
5+
## Mac 或者 Linux 命令行
6+
7+
只需要有简单的 c 编译环境`cc`
8+
9+
然后执行 `./run bfs`,其中 `bfs``Example` 中的示例目录。
10+
11+
也可以自己使用`cc` `gcc` 等,`gcc source/*.c Example/bfs/main.c -I ./include -o bfs && ./bfs`
412

513
![ScreenShot](ScreenShot.png)
614

@@ -94,3 +102,5 @@
94102
- [凸包计算](source/cvxhull.c)
95103
- [球面弧长](source/arclen.c)
96104
- [地球上两点之间的近似距离](source/geodist.c)
105+
106+

‎run‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
if [ ! -d "build" ];then
4+
mkdir build
5+
fi
6+
7+
if [ -d "Example/1ドル" ]
8+
then
9+
cc source/*.c Example/1ドル/main.c -I ./include -o build/1ドル
10+
cd build
11+
./1ドル
12+
else
13+
echo "Example does not exists"
14+
fi

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /