-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Graph class now compiles, added test file for it
- Loading branch information
1 parent
79031f4
commit 20ee762
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "graph.hpp" | ||
#include "vertex.hpp" | ||
#include <iostream> | ||
|
||
int main(int argc, char** arcv) | ||
{ | ||
Vertex* v1 = new Vertex(1, 2, 3); | ||
Vertex* v2 = new Vertex(7, 8, 9); | ||
Graph* graph1 = new Graph(v1); | ||
Graph* graph2 = new Graph(v2); | ||
|
||
printf("Graph %p starts and ends with vertices %p and %p\n", graph1, graph1->getStart(), graph1->getEnd()); | ||
printf("Graph %p starts and ends with vertices %p and %p\n", graph2, graph2->getStart(), graph2->getEnd()); | ||
|
||
graph2->setEnd(v1); | ||
printf("Graph %p starts and ends with vertices %p and %p\n", graph2, graph2->getStart(), graph2->getEnd()); | ||
|
||
} |