Skip to content

Commit 9244f26

Browse files
committed
add graph
1 parent 03745a1 commit 9244f26

File tree

7 files changed

+1508
-0
lines changed

7 files changed

+1508
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Algorithms, 4th edition textbook code (using c++)
66
1. based on STL Library
77
2. using C++14
88
3. **Not support** drawing
9+
4. **Bug: ** const object (many member function forget to add const)
910
4. Welcome to point out the error, and pull better code
1011

1112
> the code is writed and debug in CLion IDE,and not test in terminal(I will check it after finish more code)

ch4/1_Graph/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
project(1_Graph)
3+
4+
set(CMAKE_CXX_STANDARD 14)
5+
6+
set(SOURCE_FILES main.cpp ../head/Graph.h)
7+
add_executable(1_Graph ${SOURCE_FILES})

ch4/1_Graph/main.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include <iostream>
2+
#include "../head/Graph.h"
3+
4+
using namespace std;
5+
6+
int main() {
7+
string filename = "/home/ace/AceDev/C++/algorithm/ch4/data/tinyG.txt";
8+
Graph g(filename);
9+
cout << g;
10+
}

ch4/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
project(ch4)
3+
4+
set(CMAKE_CXX_STANDARD 14)
5+
6+
add_subdirectory(1_Graph)
7+
8+
9+
add_subdirectory(temp)

0 commit comments

Comments
 (0)