Jump to content
  • Revista PROGRAMAR: Já está disponível a edição #60 da revista programar. Faz já o download aqui!

FMCalisto

[Resolvido] Erro de chamada de Função

Recommended Posts

FMCalisto

Boa noite,

Tendo eu o seguinte ficheiro com o código em um ficheiro "FunDef.c":

#include <stdlib.h>
#include "Tree.h"
#include "FuncDef.h"
#include "Constants.h"
char* Key(struct Word* i)
{
return i->word;
}
void freeNode (struct node* tree)
{
free(tree->item->word);
free(tree->item->lines);
free(tree->item);
free(tree);
}
void freeText (char** text, int line_num)
{
int i;
for (i = 0; i < line_num; i++)
 free (text[i]);
free (text);
}
void freeAll (struct node* tree, char** text, int line_num)
{
freeText(text, line_num);
traverse(tree, freeNode, POST_ORDER);
}

Acontece que o compilador se queixa de uma suposta mal chamada da função do ficheiro "FunDef.h":

#ifndef Parser_FuncDef_h
#define Parser_FuncDef_h
#include "Tree.h"
struct Word{
char* word;
int counter;
int* lines;
int forgotten;
int actual_max_size_lines;
};
char* Key (struct Word* i);
void freeNode (struct node* tree);
void freeAll (struct node* tree, char** text, int line_num);
void freeText (char** text, int line_num);
#endif

Podem-me ajudar com este problema?

Cumprimentos

Edited by FMCalisto

Made by Calliboy Rules!

Share this post


Link to post
Share on other sites
FMCalisto

Já está resolvido obrigado HappyHippyHippo, acabamos agora de o resolver.


Made by Calliboy Rules!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.