0
I need to continue a job that is partially ready. However I did not find on the internet files that described or taught this in an understandable way. What is the meaning of this syntax ? Ide: Netbeans and C Language++
void Grafo::buscarElosEmProfundidade(No *origem, std::function<bool(No*, No*, Elo*)> func)
The part At the origin I understand it to be a pointer, but what about this part of Std::functio bool(No *, No *, Elo *) func)? what does it mean ?
The complete function is this :
void Grafo::buscarElosEmProfundidade(No *origem, std::function<bool(No*, No*, Elo*)> func){
ListaParEloPercorrido *percorridos = this->getPercorridos(false);
ListaParNoVisitado *visitados = this->getVisitados(false);
if(!origem->getElos()->empty())
this->buscarElosEmProfundidadeAux(*(origem->getElos()->begin()), origem, visitados, percorridos, func);
delete percorridos;
delete visitados;
} I tried calling this function like this : searchElEmProfundity(No*pointer) and gave error . What’s the right way to call her then ?
And it shouldn’t be void, right ? Because the intention of this function is to return a list of nodes that are "reachable" from the source.
If you’re doing the code, you don’t know, it gets more complicated for us. S syntax is about this: http://en.cppreference.com/w/cpp/utility/functional/function How to use it now depends on your code. You have not posted information indicating how it should be used.
– Maniero