Use chars in quotes in const char* as name of function I have been trying for a long time how to use a word declared as const string* word = &quot;xxx&quot; as name of void function declared somewhere below in my code.
Here is example with ssid:
const char* ssid = &quot;name_of_ssid&quot;;

void (*name of ssid*) () {

⠀//some code

}

I want to use word declared in const char* in quotation marks as name of function.
It can not be written just void ssid().
Yes, I can set a name of void function manually, when const char* ssid = &quot;CoffeeWifi&quot; I can type void CaffeeWifi() but I want to do that by this way because my code is specific for this option and explaining this code here would be very difficult. When I change array of const char* word from &quot;xxx&quot; to &quot;yyy&quot; I want to  change the name of void from void xxx() to void yyy() as well.
How to do that? What function should I use?
Thank you!
Such a thing is impossible (unless you keep striving; neither have I tried it yet). Judging from your intention, one thing you can do is to create an array of the names of the functions you'd like to use, another array carrying the pointers to the functions and a programme to call the function according to the input text. I haven't tried it myself, so perhaps I may not sound sensible, but that is the only thing that came to my mind.
An example:
String function_names[3] = {&quot;foo&quot;, &quot;bar&quot;, &quot;quux&quot;}; /* I am not sure of this syntax; 
                                                corrections are welcome */
int *functions[3] = {&amp;foo, &amp;bar, &amp;quux};

String input;
 
void setup(){
        Serial.begin(9600);
}

void loop(){
        while(Serial.available()){
              String temp_input = Serial.readString()
              input = (temp_input == &quot;&quot;)? String(&quot;Nothing here&quot;) : temp_input;
              execute(input);
        }
        delay(1000);
}

void execute(String func_name){
        for(int i = 0; i &lt; 3; i++){
              if(function_names[i] == func_name){
                     *functions[i]();
              }
         }
}

int foo(){
    Serial.println(&quot;foo&quot;);
    return(0);
}

int bar(){
    Serial.println(&quot;bar&quot;);
    return(0);
}

int quux(){
    Serial.println(&quot;quux&quot;);
    return(0);
}