I know, that this thread is more than 5 years old, butr my question refers to Nick Gammon's post #11.
Question : Why does IDE 1.8.8 generating the error message
"ESP8266_Menu_Funktionen_Tes2t.ino:9:4: error: 'Page1' was not declared in this scope
&Page1,
^
ESP8266_Menu_Funktionen_Tes2t.ino:10:4: error: 'Page2' was not declared in this scope
&Page2,
^
ESP8266_Menu_Funktionen_Tes2t.ino:11:4: error: 'Page3' was not declared in this scope
&Page3"
if the code in post #11 is structured like that :
typedef void (* GenericFP)();
GenericFP MenuFP[3] = {
&Page1,
&Page2,
&Page3
};
int i = 0;
void setup()
{
Serial.begin (115200);
}
void loop()
{
MenuFP [i++] ();
if (i >= 3)
i = 0;
delay (1000);
}
void Page1()
{
Serial.println ("page1");
}
void Page2()
{
Serial.println ("page2");
}
void Page3()
{
Serial.println ("page3");
}
if you structure "GenericFP MenuFP[3] = {&Page1, &Page2, &Page3};" this way, it compiles without any error and runs as expected