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?


Might be a missing semicolon previous to line 81 in the *.cpp file, or missing header file, or missing declaration of INBUFF and OUTBUFF, or a host of other things.

As per the data provided by you, everything seems fine so please post the complete code in flow....