I am using C++ in native mode with Visual Studio 2017. That compiler compiles the statement below without complaint:
const char * AnArrayOfStrings[] = {"z1y2x3w4", "Aname"};
However, if I change the above statement to specify that char is signed or unsigned, the compiler emits a C2440 error. For instance, the statements below, do not compile:
const signed char * AnArrayOfStrings2[] = {"z1y2x3w4", "Aname"};
const unsigned char * AnArrayOfStrings2[] = {"z1y2x3w4", "Aname"};
I fail to see the reason for the compiler refusing to compile the statement when the sign of char is made explicit.
My question is: is there a good reason that I have failed to see for the compiler refusing to compile those statements ?
Thank you for your help (I did research in StackOverflow, the C++ documentation, I used Google and, consulted about a dozen C/C++ books in an effort to find the answer myself but, a reason still eludes me.)