Since there is not enough code to compile and test I would have to guess that "main" calls "whatsx", which is only a copy of the variable,, but the function does return the input to somewhere.
Having no idea where "x" is defined again I would guess that "showx" would need to have the variable "x" passed to the function.