1 2 3 4 5 6 7 8 9
void Gsearch(int st, int **graph, bool *visited, int n){ int r; visited[st]=true; for (r=0; r<n; r++) if ((graph[st][r]) && (!visited[r])){ cout << st << " -> " << r << endl; Gsearch(r, graph, visited, n); } }