deprecated conversion from string constant to ‘char*’
Hi all,
I've just updated my linux system (Debian) and went to compile some code I'm working on. However it causes some problems, presumable because of GCC up dates. I get many of my subject line errors for example
../../common/Version_Control.cpp: In function ‘int VersionControl()’:
../../common/Version_Control.cpp:55: warning: deprecated conversion from string constant to ‘char*’
So I check up the error and it comes from my error handler code which is a function
extern void SetError(char *string,int error_number)
The net tells me all I need to do is convert char *string to const char *string, however when I do so and recompile I get the following error
Error_Control.cpp: In function ‘void SetError(const char*, int)’:
Error_Control.cpp:41: error: invalid conversion from ‘const char*’ to ‘char*’
make: *** [Error_Control.o] Error 1
So I think I've done exactly what's recommended ? Can anyone advise?
Thanks
|