However, I keep on getting this error "cannot convert 'String' to 'const char*'". here is my code: #define maxCommandLength 64 String commands[] = {"/test", "/say", "/reset", "/sleep"}; void setup() { // put your setup code here, to run once: Serial.begin...
the string in 6 different variables( a sample input string when split up has 6 terms). i have the following error popping up: cannot convert 'String' to 'char*' for argument '1' to 'char* strtok(char*, const char*)' . Can you guys suggest changes to the code to get it ...
There is the String.c_str() function to get the pointer. So, you strcpy() should be written like that : Code:Select allstrcpy (WiFSSID, WiFi.SSID(i).c_str()); Re: Compile error - cannot convert 'String' to 'const char*'#40424 ...
I am using TinyGSM library to set-up GPRS connection successfully. I then use ArduinoHttpClient library to attempt to complete the GET as follows: Declarations: TinyGsm modem(SerialAT); static const char host[] = "MY-RESTDB.restdb.io"; static int port=443; char *resource="/...