diff --git a/src/walktrap_graph.cpp b/src/walktrap_graph.cpp
--- a/src/walktrap_graph.cpp
+++ b/src/walktrap_graph.cpp
@@ -28,6 +28,9 @@
#include <iostream>
#include <fstream>
#include <sstream>
+#include <cstdlib> // exit
+#include <cstring> // strlen
+#include <algorithm> // sort
#include "walktrap_graph.h"
using namespace std;
@@ -144,7 +147,7 @@
for(int i = 0; i < G.nb_vertices; i++) {
if(G.vertices[i].degree == 0) {
cerr << "error : degree of vertex " << i << " is 0" << endl;
- exit(0);
+ std::exit(0);
}
G.vertices[i].edges = new Edge[G.vertices[i].degree + 1];
G.vertices[i].edges[0].neighbor = i;
@@ -163,7 +166,7 @@
}
for(int i = 0; i < G.nb_vertices; i++)
- sort(G.vertices[i].edges, G.vertices[i].edges+G.vertices[i].degree);
+ std::sort(G.vertices[i].edges, G.vertices[i].edges+G.vertices[i].degree);
for(int i = 0; i < G.nb_vertices; i++) { // merge multi edges
int a = 0;
@@ -186,7 +189,7 @@
if(index != 0) {
m += long(nb_vertices)*sizeof(char*);
for(int i = 0; i < nb_vertices; i++)
- m += strlen(index[i]) + 1;
+ m += std::strlen(index[i]) + 1;
}
return m;
}