I'm having problems with validation methods in the C ++ library (openNN), which I am trying to compile in Xcode. I will use an example of one of the methods, since I suspect that they are all caused by the same problem.
The header declaration where I get the error message:
Expected member name or ';' after ad qualifiers.
void check(void) const;
Function Definition:
void InverseSumSquaredError::check(void) const
{
std::ostringstream buffer;
if(!neural_network_pointer)
{
buffer << "OpenNN Exception: InverseSumSquaredError class.\n"
<< "void check(void) const method.\n"
<< "Pointer to neural network is NULL.\n";
throw std::logic_error(buffer.str().c_str());
}
const MultilayerPerceptron* multilayer_perceptron_pointer = neural_network_pointer->get_multilayer_perceptron_pointer();
if(!multilayer_perceptron_pointer)
{
buffer << "OpenNN Exception: InverseSumSquaredError class.\n"
<< "void check(void) const method.\n"
<< "Pointer to multilayer perceptron is NULL.\n";
throw std::logic_error(buffer.str().c_str());
}
const unsigned int inputs_number = multilayer_perceptron_pointer->count_inputs_number();
const unsigned int outputs_number = multilayer_perceptron_pointer->count_outputs_number();
if(inputs_number == 0)
{
buffer << "OpenNN Exception: InverseSumSquaredError class.\n"
<< "void check(void) const method.\n"
<< "Number of inputs in multilayer perceptron object is zero.\n";
throw std::logic_error(buffer.str().c_str());
}
if(outputs_number == 0)
{
buffer << "OpenNN Exception: InverseSumSquaredError class.\n"
<< "void check(void) const method.\n"
<< "Number of outputs in multilayer perceptron object is zero.\n";
throw std::logic_error(buffer.str().c_str());
}
if(!mathematical_model_pointer)
{
buffer << "OpenNN Exception: InverseSumSquaredError class.\n"
<< "void check(void) const method.\n"
<< "Pointer to mathematical model is NULL.\n";
throw std::logic_error(buffer.str().c_str());
}
if(!data_set_pointer)
{
buffer << "OpenNN Exception: InverseSumSquaredError class.\n"
<< "void check(void) const method.\n"
<< "Pointer to data set is NULL.\n";
throw std::logic_error(buffer.str().c_str());
}
}
void InverseSumSquaredError::check(void) const;
:
++ 98 Library lib++.
Xcode Objective-C ++, .
, , , .