c - How do you cast a pointer to a character without using an ampersand? -
For a project I want to push the pointer from an int to switch a byte Hex There is only one warning on prices that I am not allowed to use ampersand.
So I've worked with this line of code:
int x = 5000; Char * ptr = (four *) & amp; X;
But clearly I need to find a way to insert this indicator without using ampersands. Does anyone know of a way to do this? I am searching and I have not found a way that is not included in the use of ampersands or other operators to use me (|, [,],
Make an association.
union myUnion {int x; Four c [4]; } U; Char * ptr = u.c; U.x = 5000;
Comments
Post a Comment