 <p>C allows you to not specify any arguments in a declaration (function prototype), and the compiler will parse it as the function takes an unknown number of unspecified arguments. In C++ a function declaration without arguments means that the function doesn't take any arguments, it's the same as using the argument <code>void</code>. You need to specify the arguments in the declaration.</p> <p>Which leads to your error: It's impossible to answer why you get the errors when you add the arguments as the question doesn't show more context, but an educated guess is that you miss some header file. Do you include the header file where <code>XDR</code> is declared? Do you include <code>&lt;stdio.h&gt;</code> (for <code>FILE</code>)?</p>