problem with char *array[]declaration

//I get the warning from compiler about this declaration(global):
//copy/paste both: my declaration and warning.
 
 char *S[13] = {"Ellen","Catherine","Aleks","Georgia","Shaun","Sophie","JackS","Matilda","Tommy","Jack","Josh","Luke","Najood"};

//Warning:
15 126 C:\Users\novicius\Documents\rota.cpp [Warning] deprecated conversion from string constant to 'char*' [-Wwrite-strings]

//Project compile and does what it meant to do, but I do not like warnings (nobody does).Syntax is taken from "C++ without fear"(Brian Overland,1st edition 2005).I use Dev-C++ 5.6.2. Thanks for advice.
Use a string type array.
 
string S[13] = {"Ellen","Catherine","Aleks","Georgia","Shaun","Sophie","JackS","Matilda","Tommy","Jack","Josh","Luke","Najood"};

Last edited on
Thank you for (quick btw) reply; string type is working without warnings so I am happy with that. I guess book from 2005 could be a bit outdated in some areas, but it is great book anyway.
Topic archived. No new replies allowed.