Error: invalid conversion from 'int (*)()' to 'int (*)(String)' [-fpermissive]

Your function should take a String parameter like this

int testFunction(String dmy)
{
  ...
}


Actually your topic title didn’t reflect the actual error message, which made it even more obscure.
So I’ve “corrected” this, and then the error does actually tell you what was wrong

invalid conversion from 'int (*)()' to 'int (*)(String)'

This tells you clearly, that you try to convert a function pointer ( (*)(...) ) to a function that returns an int and doesn’t take any parameters ( () ) into a function pointer ( (*)(...) ) to a function that returns an int but expects a ( (String) ) as argument.

In code

// you do
int testFunction();
// instead of 
int testFunction(String dmy);

The forum search for [-fpermissive] came up with similar questions (e.g. here, here, here and others)

2 Likes