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