Update Graph.cpp

stack to string type