Here I have a piece of code which is a part of a class named Sistema (all the declarations are in a separate file). The first function is supposed to call the next one, which is a recursive function that reads some tree (Arbre is a custom implementation of tree).
While running the program the output shows the "entering function" line, just before the funcion call, but I never get "new node" line. So my program gets lost somewhere between the funcion call and the function itself, even before any recursive call. I never got a problem like this before. Any clue about what is happenig?
Here is the code:
#include "Sistema.hpp"
............
list<int> Sistema::proc_peticion(int pelicula, int tiempo, int tamano){
list<int> srv;
Arbre<int> arb = estructura;
bool unidad_tmp = false;
int dist = 0, bw = 0;
cout << "entering function" << endl;
camino(srv, arb, pelicula, tiempo, tamano, unidad_tmp, dist, bw);
return srv;
}
............
void Sistema::camino(list<int>& srv, Arbre<int>& arb, const int& pel, const int& tmp, const int& size, bool& unidad_tmp, int& dist, int& bw){
cout << "new node ";
if (not arb.es_buit()){
..................
}
}
I tried to leave only the parts of the code that might be useful, to make it more readable. Let me know if you need something more.
Thanks in advance