code-conversion

trouble understanding list.begin() | list.end() | list<int>::iterator i

trouble understanding list.begin() | list.end() | list<int>::iterator i Question: void Graph::max_path(){ for(int i=0; i <N; i++){ cost[i]=0; cam_max[i]=999; } // Percorre todos os vertices adjacentes do vertice int max = 0; list<int>::iterator i; for (int a = 0; a < N ; a++){ int v = ordely[a]; for (i = adj[v].begin(); i != adj[v].end(); ++i){ …

Total answers: 1