I asked this on Taking an index out of const char* argument along with another question, but debate got only to the first question, so I splitted it to a different thread.
Question:
Is there any reason anyone would ever want to represent a C string as const char* and not as const unsigned char*?
- On one hand, I see the commonly used representation of C str as const char* all the time.
- On the other hand, using const char* sometimes forces a cast to unsigned, like in the example linked above.
Thanks,