How to fix: Invalid conversion from 'const char*' to 'char*' [-fpermissive] I'm trying to upload the code from here to work with an ESP8266. So I copy/pasted the code to the Arduino IDE and I get this error:


  C:\Program Files (x86)\Arduino\libraries\WiFi\src/WiFi.h:79:9: error:   initializing argument 1 of 'int WiFiClass::begin(char*, const char*)' [-fpermissive]
  
  int begin(char* ssid, const char *passphrase);
         ^
  
  exit status 1
  invalid conversion from 'const char*' to 'char*' [-fpermissive]


Can anyone help me with this?
This begin() method expects a modifiable character array as its first argument. That's what you should provide:

char ssid[]           = "YOUR_SSID";      // this is changed
const char* password  = "YOUR_PASSWORD";  // this is fine
[...]
WiFi.begin(ssid, password);