Declaring arry of strings - Reference Document code fails

Sampel code from

https://www.arduino.cc/reference/en/language/variables/data-types/string/

char *myStrings[] = {"This is string 1", "This is string 2", "This is string 3",
                     "This is string 4", "This is string 5", "This is string 6"
                    };

void setup() {
  Serial.begin(9600);
}

void loop() {
  for (int i = 0; i < 6; i++) {
    Serial.println(myStrings[i]);
    delay(500);
  }
}

Uploads, but with warnings:

C:\Users\shrdl\OneDrive\Documents\Arduino\sketch_apr28a\sketch_apr28a.ino:3:21: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]

};

^

C:\Users\shrdl\OneDrive\Documents\Arduino\sketch_apr28a\sketch_apr28a.ino:3:21: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]

etc.

Any suggestions?
Thanks

forbids converting a string constant to 'char*'

const char *myStrings[] = {"This is string 1", "This is string 2", "This is string 3",
                     "This is string 4", "This is string 5", "This is string 6"
                    };

Thanks Greg. Does that mean the reference documentation is wrong?

i don't know which ISO version of C++ added the warning.

It is reasonable that this has to be 'const' as you cannot change things after compile time.

Probably will never be changed in the reference :frowning: