Graphs - c++