fork download
  1. int total (tipo_arvore *raiz)
  2. {
  3. int result = 0;
  4.  
  5. if (raiz != NULL)
  6. {
  7. result += total(raiz->esq);
  8. result += total(raiz->dir);
  9. result += 1;
  10. }
  11.  
  12. return result;
  13.  
  14. }
  15.  
  16. // Chamada:
  17. int total_esquerda = total(raiz->esq);
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:12: error: unknown type name ‘tipo_arvore’
 int total (tipo_arvore *raiz)
            ^~~~~~~~~~~
prog.c:17:22: warning: implicit declaration of function ‘total’ [-Wimplicit-function-declaration]
 int total_esquerda = total(raiz->esq);
                      ^~~~~
prog.c:17:28: error: ‘raiz’ undeclared here (not in a function)
 int total_esquerda = total(raiz->esq);
                            ^~~~
stdout
Standard output is empty