Xcode error compiling c++ Expected member name or ';' after declaration specifiers <p>I'm having issues with the checking methods in a c++ library (openNN) i'm trying to compile in Xcode. I'll use an example of one of the methods as i suspect they are all caused by the same issue. </p> <p>Header declaration where i get the error:<br> <em>Expected member name or ';' after declaration specifiers.</em></p> <pre><code>void check(void) const; </code></pre> <p>Function definition:</p> <pre><code>void InverseSumSquaredError::check(void) const { std::ostringstream buffer; // Neural network stuff if(!neural_network_pointer) { buffer &lt;&lt; "OpenNN Exception: InverseSumSquaredError class.\n" &lt;&lt; "void check(void) const method.\n" &lt;&lt; "Pointer to neural network is NULL.\n"; throw std::logic_error(buffer.str().c_str()); } const MultilayerPerceptron* multilayer_perceptron_pointer = neural_network_pointer-&gt;get_multilayer_perceptron_pointer(); if(!multilayer_perceptron_pointer) { buffer &lt;&lt; "OpenNN Exception: InverseSumSquaredError class.\n" &lt;&lt; "void check(void) const method.\n" &lt;&lt; "Pointer to multilayer perceptron is NULL.\n"; throw std::logic_error(buffer.str().c_str()); } const unsigned int inputs_number = multilayer_perceptron_pointer-&gt;count_inputs_number(); const unsigned int outputs_number = multilayer_perceptron_pointer-&gt;count_outputs_number(); if(inputs_number == 0) { buffer &lt;&lt; "OpenNN Exception: InverseSumSquaredError class.\n" &lt;&lt; "void check(void) const method.\n" &lt;&lt; "Number of inputs in multilayer perceptron object is zero.\n"; throw std::logic_error(buffer.str().c_str()); } if(outputs_number == 0) { buffer &lt;&lt; "OpenNN Exception: InverseSumSquaredError class.\n" &lt;&lt; "void check(void) const method.\n" &lt;&lt; "Number of outputs in multilayer perceptron object is zero.\n"; throw std::logic_error(buffer.str().c_str()); } // Mathematical model stuff if(!mathematical_model_pointer) { buffer &lt;&lt; "OpenNN Exception: InverseSumSquaredError class.\n" &lt;&lt; "void check(void) const method.\n" &lt;&lt; "Pointer to mathematical model is NULL.\n"; throw std::logic_error(buffer.str().c_str()); } // Data set stuff if(!data_set_pointer) { buffer &lt;&lt; "OpenNN Exception: InverseSumSquaredError class.\n" &lt;&lt; "void check(void) const method.\n" &lt;&lt; "Pointer to data set is NULL.\n"; throw std::logic_error(buffer.str().c_str()); } // Final solutions error stuff } </code></pre> <p>If i change the definition in the header to <br> <code>void InverseSumSquaredError::check(void) const;</code><br> I end up with the error: <br> <em>Extra qualification on member 'check'</em><br> <br> I'm currently using the dialect C++98 and Library libc++. Xcode is set to compile sources as Objective-C++ which takes care of most of the other errors.</p> <p>I can't think of anything else relevant to this issue, it's had me stumped for hours, so any type of help is much appreciated.</p>