Skip to main content
Arduino

Return to Question

Bumped by Community user
Tweeted twitter.com/StackArduino/status/1389097433913774081

i amI have been trying for a long time how to use a word declared as const string* word = "xxx"const string* word = "xxx" as name of void function declared somewhere below in my code.

Here is example with ssidssid:

const char* ssid = "name_of_ssid";
void (*name of ssid*) () {
⠀//some code
}

I want to use word declared in const char*const char* in quotation marks as name of function. It can not be written just void ssid()void ssid(). Yes, iI can set a name of void function manually, when const char* ssid = "CoffeeWifi" iconst char* ssid = "CoffeeWifi" I can type void CaffeeWifi()void CaffeeWifi() but iI want to do that by this way bcsbecause my code is specific for this option and explaining this code here would be very difficult. When iI change array of const char*const char* word from "xxx""xxx" to "yyy" i"yyy" I want to change the name of void from void xxx()void xxx() to void yyy()void yyy() as well.

How to do that? What function i should I use?

Thank you guyz!

i am trying for long time how to use a word declared as const string* word = "xxx" as name of void function declared somewhere below in my code.

Here is example with ssid:

const char* ssid = "name_of_ssid";
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 = "CoffeeWifi" i can type void CaffeeWifi() but i want to do that by this way bcs 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 "xxx" to "yyy" i want to change the name of void from void xxx() to void yyy() as well.

How to do that? What function i should use?

Thank you guyz!

I have been trying for a long time how to use a word declared as const string* word = "xxx" as name of void function declared somewhere below in my code.

Here is example with ssid:

const char* ssid = "name_of_ssid";
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 = "CoffeeWifi" 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 "xxx" to "yyy" 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!

i am trying for long time how to use a word declared as const string* word = "xxx" as name of void function declared somewhere below in my code.

Here is example with ssid:

const char* ssid = "name_of_ssid";

void (name of ssid) () {

⠀//some code

}

const char* ssid = "name_of_ssid";
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 = "CoffeeWifi" i can type void CaffeeWifi() but i want to do that by this way bcs 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 "xxx" to "yyy" i want to change the name of void from void xxx() to void yyy() as well.

How to do that? What function i should use?

Thank you guyz!

i am trying for long time how to use a word declared as const string* word = "xxx" as name of void function declared somewhere below in my code.

Here is example with ssid:

const char* ssid = "name_of_ssid";

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 = "CoffeeWifi" i can type void CaffeeWifi() but i want to do that by this way bcs 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 "xxx" to "yyy" i want to change the name of void from void xxx() to void yyy() as well.

How to do that? What function i should use?

Thank you guyz!

i am trying for long time how to use a word declared as const string* word = "xxx" as name of void function declared somewhere below in my code.

Here is example with ssid:

const char* ssid = "name_of_ssid";
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 = "CoffeeWifi" i can type void CaffeeWifi() but i want to do that by this way bcs 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 "xxx" to "yyy" i want to change the name of void from void xxx() to void yyy() as well.

How to do that? What function i should use?

Thank you guyz!

Source Link
oreo
  • 39
  • 1

Use chars in quotes in const char* as name of function

i am trying for long time how to use a word declared as const string* word = "xxx" as name of void function declared somewhere below in my code.

Here is example with ssid:

const char* ssid = "name_of_ssid";

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 = "CoffeeWifi" i can type void CaffeeWifi() but i want to do that by this way bcs 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 "xxx" to "yyy" i want to change the name of void from void xxx() to void yyy() as well.

How to do that? What function i should use?

Thank you guyz!

lang-cpp

AltStyle によって変換されたページ (->オリジナル) /