Hi all,
I am getting a compiler error for the following:
The following is the declaration in the header:
void init(INBUFF ** , OUTBUFF ** ); ---->line no 21
The following is the function init:
void init(INBUFF ** inbuffptr, OUTBUFF ** outbuffptr)
{ ------------------->line no 81
*inbuffptr = (INBUFF *) malloc(sizeof(INBUFF));
*outbuffptr = (OUTBUFF *) malloc(sizeof(OUTBUFF));
(*inbuffptr)->begin = (*inbuffptr)->end = (*inbuffptr)->next = NULL;
(*outbuffptr)->begin = (*outbuffptr)->end = NULL;
}
This function is invoked by the following code snippet:
INBUFF * inbuff1 = NULL;
OUTBUFF * outbuff1 = NULL;
init(&inbuff1, &outbuff1);
The error that I get when i compile is:
Icore.c:81: error: conflicting types for âinitâ
Iheader.h:21: error: previous declaration of âinitâ was here
Could any one please tell why this compiler error is being generated?
Thanks,
Prashanth