What exactly are you trying to do? Recursive functions usually have a parameter that is used to check the base case and initialize the first call. They typically add/subtract/multiply/divide by making a recursive/successive calls to the function.
void SPBruteForce::getSPAll(Vertex *e, Cycle *c){
Cycle *b = new Cycle(1024);
for(int i = 0; i < c->getSize(); i++)
b->addVertex(c->getVertex(i));
if(c.getLast()->getName() == e->getName()){
allCycles[currentCycles] = c;
currentCycles++;
QMessageBox msgBox;
msgBox.setText("jkjh");
msgBox.exec();
}else{
int f = c.getLast()->getNumberOfNeighbours();
for(int i = 0; i < f; i++){
if(!c.contains(c.getLast()->getNeighbour(i)->getName())){
c.addVertex(c.getLast()->getNeighbour(i));
getSPAll(e, c);//Please make shure that you can execute this instruction
}
}
}
}