I have the following declaration.
namespace test{
static cl_option* find_opt(const int &val, const cl_option *options);
}
test::cl_option* test::find_opt(const int &val, cl_option *options){}
The problem is when compiling I get the following error.
error: ‘test::cl_option* test::find_opt(const int&, test::cl_option*)’ should have been declared inside ‘test’
Thanks in advance
The function you declared is different from the one you tried to define: the second parameter is “const” in the declaration, and not in the definition. Those are two different functions.