What does (char *) x or (void *) z mean?

后端 未结 7 508
别那么骄傲
别那么骄傲 2021-01-22 03:47

I know char *x means a pointer to char, but I\'m confused about what (char*) x means.

7条回答
  •  春和景丽
    2021-01-22 04:18

    () is the cast operator.

    (char *) x means "apply the cast operator to operand x".

    The cast operator converts the value of the operand to the type between ().

提交回复
热议问题