Simple problem, need to convert String to const char*. Here is what I have done already:
const char* ssid;
String nameS = "SSIDName";
int ssid_len = nameS.length() + 1;
char ssid_array[ssid_len];
ssid = nameS.toCharArray(ssid_array, ssid_len);
//ERROR MESSAGE : void value not ignored as it ought to be
ssid = nameS.toCharArray(ssid_array, ssid_len);
//ERROR MESSAGE : void value not ignored as it ought to be
Does the toCharArray() method return a value ? From the error message it would seem not. The converted String is copied to the supplied array of chars.
Simple problem, need to convert String to const char*. Here is what I have done already:
There is no problem.
You ain't need no conversion.
What about removing the "String" bullshit from the code and only using nullterminated strings?
The library you are planning to use seems to use only nullterminated strings and no bullshit String objects at alll.
Why not doing the same in the sketch?
Suggested code for defining a char pointer constant in a sketch code: