user26859: 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?

user31105: The location where you are calling the function begin, has as first parameter a parameter of type const char* instead of char* ... remove the const from this argument type.
Probably you have something like
const char* s = ....

...

...begin(s, ...)

Change class s to
char* s = ...


user7508: 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);


26859: <p>I'm trying to upload the code from <a href="https://raw.githubusercontent.com/RuiSantosdotme/Random-Nerd-Tutorials/master/Projects/ESP32/web_server_outputs.ino" rel="nofollow noreferrer">here</a> to work with an ESP8266. So I copy/pasted the code to the Arduino IDE and I get this error:</p>

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

<p>Can anyone help me with this?</p>
 31105: <p>The location where you are calling the function begin, has as first parameter a parameter of type const char* instead of char* ... remove the const from this argument type.</p>

<p>Probably you have something like</p>

<pre><code>const char* s = ....

...

...begin(s, ...)
</code></pre>

<p>Change class s to</p>

<pre><code>char* s = ...
</code></pre>
 7508: <p>This <code>begin()</code> method expects a modifiable character array as its first argument. That's what you should provide:</p>

<pre class="lang-cpp prettyprint-override"><code>char ssid[]           = "YOUR_SSID";      // this is changed
const char* password  = "YOUR_PASSWORD";  // this is fine
[...]
WiFi.begin(ssid, password);
</code></pre>
