Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Arbre<Circuito::estacion> Circuito::preorden(int x, int pot) {
- int dist, gas;
- estacion est;
- Arbre<estacion> a;
- cin >> est.dist >> est.gas;
- if (est.dist != -1 and est.gas != -1) {
- est.ident = x;
- Arbre<estacion> a1;
- Arbre<estacion> a2;
- a1 = preorden(2*x);
- a2 = preorden(2*x + 1);
- a.plantar(est, a1, a2);
- }
- return a;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement