As I know C enum is unsigned integer, but this may vary by implementation. What type should I use for the enum in binary representation?
*PS 'binary representation' means byte-array. I want to serialize enum values to socket to inter-operate with other programs.
enum
is an integer type; it's not unsigned. What do you mean by "enum in binary representation"? Can you provide an example? Do you mean you want a type suitable for, say, bitmasks? – Tentedenum
s areunsigned int
is a not correct. – Belak