void slice_first_char(char ** string)
{
*string = &(*string[1]);
}
int main(int argc, char * argv[])
{
char * input = "abc";
input = &(input[1]);
puts(input); // "bc" as expected.
slice_first_char(&input);
puts(input); // \372\277_\377
// What‘s going on?
}
如何重写 slice_first_char 函数以使其按预期工作?