C++ Graph Algorithm Project