Azz00
Dec 7th, 2002, 08:56 PM
I have this macros....
is there anyway i can make another one to convert the madePkt Back to the 2 ascii chars that made it up ?
typedef unsigned short p_type;
/*Make a Packet ID from 2 ASCII Chars */
#define make_pkt(a,b) p_type(((a)&255) | (b)<<8)
#define madePkt make_pkt ('C','H')
is there anyway i can make another one to convert the madePkt Back to the 2 ascii chars that made it up ?
typedef unsigned short p_type;
/*Make a Packet ID from 2 ASCII Chars */
#define make_pkt(a,b) p_type(((a)&255) | (b)<<8)
#define madePkt make_pkt ('C','H')