S
Steven Woody
somewhere in my code,
char* rtnStrs[] = { "ok", "error", NULL };
foo( rtnStrs );
here, foo was decleared as 'void foo( const char * rtnStrs[] ).
but the gcc compiler will report ' can not convert from char ** to
const char ** '. i usually know that one can not convert a const to a
non-const, but why here i can not convert a non-const to const ?
thanks.
-
woody
char* rtnStrs[] = { "ok", "error", NULL };
foo( rtnStrs );
here, foo was decleared as 'void foo( const char * rtnStrs[] ).
but the gcc compiler will report ' can not convert from char ** to
const char ** '. i usually know that one can not convert a const to a
non-const, but why here i can not convert a non-const to const ?
thanks.
-
woody