0

structure:

typedef int TIPAS;

struct sarasas{
    int prioritetas;
    TIPAS kintamasis;
    struct sarasas *kitas;
};
typedef struct sarasas elementas;

struct priorEile{
    elementas* galva;
    int ilgis;
};
typedef struct priorEile* p_eile;
typedef struct priorEile** p_eile2;

header:

void sukurti(p_eile2); 

function

void sukurti(p_eile* eilute){
    *eilute=(struct priorEile*)calloc(1,sizeof(struct priorEile));
    (*eilute)->galva=NULL;
}

it's all about creating priority queue. I have an error conflicting typer in "sukurti" and previous declaration of "sukurti" was there. Any solutions? Where I made a mistake?

1 Answers1

1

You have the error because the type of return value of function sukurti differs between the declaration and the definition.

Try changing int sukurti(p_eile* eilute){ to void sukurti(p_eile* eilute){.

MikeCAT
  • 73,922
  • 11
  • 45
  • 70