Possible Duplicate:
C++ deprecated conversion from string constant to ‘char*’
I am getting "deprecated conversion from string constant to ‘char*’" error on gcc compiler at 3 places.
When I was compiling it on codeblock, no error was there.
char* decodeCode(char* encodedString)
{
const char* decodedString = ""; // ERROR
char* a = encodedString;
char store[10000];
for(int j=0;j <strlen(a);j++)
{
if (isdigit(a[j]) || a[j] == '#')
continue;
else return ""; //ERROR
}
}
int main()
{
const char* a;
a = decodeCode("6999066263304447777077766622337778"); // ERROR
printf("%s",a);
return 0;
}
Have you any idea how I could fix it? If so, please write it down clearly (I am newbie...).