[CPP] Conversion from char** to const char** Not Allowed
Source
http://coding.derkeiler.com/Archive/C_CPP/comp.lang.cpp/2004-10/1514.htmlDescription
If the conversion from char** to const char ** is allowed, then user may write a sequence of assignments which modifies a constant. Following is an exsample from Gianni Mariani posted at coding.derkeiler.com
const char * A[2] = { "A", "B" };
char * B[2];
int main() {
char ** b = B; }
const char ** a = b; // illegal
//const char ** a = ( const char ** ) b; // BAD work-around (1)
//const char * const * a = b; // better option (2)
a[0] = A[0]; // illegal if you use (2) ok if you use (1)
b[0][0] = 'X'; // const violation - big probs if you use (1)