how to traverse a pointer to set in c ++?

1
Hello, I'm implementing the Kruskal algorithm, but I can not walk through set< No*>* to test the FIND_SET method, which is a set< No*>* how should I proceed? (in the rest of the code I was running set with foreach, as set< No*>* I do not know what to do);

static void Kruskal(Grafo* g) {

    vector<set<No*>> conjuntos;
    No* save;
    int zero = 0;
    for each (No* vertice in g->vetor)
    {

        set<No*> con =MAKE_SET(vertice);
        if (zero == 0) {
            save = vertice;
            zero = 1;


        }
        conjuntos.push_back(con);
        for each (No* var in con )
        {
            cout << var->nome << endl;
        }
    }

    vector <pair<pair<No*, No*>, double>> arestas;
    iniciar_arestas(arestas, g);
    ordenar_arestas(arestas);
    exibir_arestas(arestas);
    cout << endl << endl;

    set<No*>* conj = NULL;
        conj =(FIND_SET(save, conjuntos));

    if (conj != NULL) {

        //Aqui
        //quero exibir os membros de conj que eh um set*


    }
    else{
        cout << "false";
}

}

In this more specific section I want to do this:

set<No*>* conj = NULL;
    conj =(FIND_SET(save, conjuntos));

if (conj != NULL) {

    //Aqui
    //quero exibir os membros de conj que eh um set*


}
    
asked by anonymous 13.11.2017 / 16:53

0 answers