I have declared the string array in my code as follows.
char *arr[] ={
"xyz",
"abc",
"pqr",
NULL
};
When compile then got following warning
warning: deprecated conversion from string constant to 'char*''
i know that "xyz" and other string literal are const char and my array is char* so have resolve it by declaring my array const char* arr but i loss the control to point this array in another pointer. So to resolve above issue have declared array as follows
char *arr[] ={
(char *)"xyz",
(char *)"abc",
(char *)"pqr",
NULL
};
But this type of declaration not fair when need large array (more then 100 string array). So any one have idea to resolve it by another way.