The situation is as follows:
I have a struct with a field that is a pointer pointer, however I want to pass as a parameter in a function only the pointer pointed to, that is, the most internal pointer of that field in the struct:
In code it would look like this:
typdef struct
{
int **ponteiro;
}Ponteiro;
I have the addressing assignment this way:
grafo->vertices[posicao_B].vertice_adjacente[(grafo->vertices[posicao_B].qtd_adjacentes-1)] = &grafo->vertices[posicao_A]; <-- aqui estou tentando fazer com que o ponteiro de ponteiro (**vertice_adjacente) aponte para o endereço de (&grafo->vertices[posicao_A])
And I'm trying to print like this, but nothing is being printed:
printf("Vertice adjacente de A %d\n",(grafo->vertices[posicao_A].vertice_adjacente[0]->num_vertice));
Just remembering that (vertex_adjacent) is an array of pointers dynamically allocated by a function that I have developed.
If you can help me, thank you!