C preproccessor problem
<p>I have a program to find the reciprocal of a number but the main program is written in C and the <code>reciprocal</code> function is written in c++.Next I have a header file <code>reciprocal.hpp</code> that has some of the conditional compilation code that makes the <code>reciprocal</code> function an extern function.Can someone please explain me what is there in the <code>reciprocal.hpp</code> program.</p>

<p><strong>main.c</strong></p>

<pre><code>#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt;

int main(int argc,char **argv)
{
int i;
i = atoi(argv[1]);
printf("\nThe reciprocal of %d is %f\n",i,reciprocal(i));
return 0;
}
</code></pre>

<p><strong>reciprocal.cpp</strong></p>

<pre><code>#include&lt;cassert&gt;
#include "reciprocal.hpp"

double reciprocal(int i)
{
assert( i != 0);
return 1.0/i;
}
</code></pre>

<p><strong>reciprocal.hpp</strong></p>

<pre><code>#ifdef __cplusplus
extern "C"
{
#endif

extern double reciprocal(int i);

#ifdef __cplusplus
}
#endif
</code></pre>

<p>I don't understand what is happening in <code>reciprocal.hpp</code>.Please help!!</p>
