Linkstate(Dijkstra) and Distance Vector(Bellman-Ford) implementation in C++