diff --git a/Makefile b/Makefile index 4ecc2ba..3ecd532 100644 --- a/Makefile +++ b/Makefile @@ -16,12 +16,12 @@ DPATH = dep OPATH = obj # File type of source file -STYPE = c +STYPE = cpp VPATH = $(SPATH) $(IPATH) $(DPATH) $(OPATH) # compiler and compiler flags -CC = gcc +CC = g++ CFLAGS = -I$(IPATH) -pthread -lrt # list of object files diff --git a/inc/graph.h b/inc/graph.hpp similarity index 100% rename from inc/graph.h rename to inc/graph.hpp diff --git a/inc/read_input.h b/inc/read_input.hpp similarity index 100% rename from inc/read_input.h rename to inc/read_input.hpp diff --git a/src/graph.c b/src/graph.cpp similarity index 93% rename from src/graph.c rename to src/graph.cpp index 54e63a2..1ff8da7 100644 --- a/src/graph.c +++ b/src/graph.cpp @@ -1,5 +1,5 @@ -#include -#include "graph.h" +#include +#include "graph.hpp" int graph_reduce(struct adjmatrix *graph) { // TODO: Implement a function which checks if a process is blocked diff --git a/src/main.c b/src/main.cpp similarity index 76% rename from src/main.c rename to src/main.cpp index 2ededfe..25be347 100644 --- a/src/main.c +++ b/src/main.cpp @@ -3,9 +3,9 @@ +-------------+---------+-----------------------+ | Created 2022-04-16 | +-----------------------------------------------+ */ -#include // printf -#include "graph.h" // Graph reduction/Knot detection, struct adjmatrix -#include "read_input.h" //TODO: Read input in the associated C file, and provide an interface to that function here +#include // printf +#include "graph.hpp" // Graph reduction/Knot detection, struct adjmatrix +#include "read_input.hpp" //TODO: Read input in the associated C file, and provide an interface to that function here int main(int argc, char** argv) { diff --git a/src/read_input.c b/src/read_input.cpp similarity index 93% rename from src/read_input.c rename to src/read_input.cpp index 7488b89..7d0b1d8 100644 --- a/src/read_input.c +++ b/src/read_input.cpp @@ -1,7 +1,7 @@ //TODO: Include C file IO header (stdio.h? Whatever it is) -#include -#include "graph.h" // struct adjmatrix -#include "read_input.h" // read_input +#include +#include "graph.hpp" // struct adjmatrix +#include "read_input.hpp" // read_input #define MAX_LINE_LEN 1024