I have a typedef struct with different data types in it. The number array has negative and non-negative values. How do I convert this struct in to a unint8t array in C++ on the Linux platform. Appreciate some help on this. Thank you. The reason I am trying to do the conversation is to send this uint8_t buffer as a parameter to a function.
typedef struct
{
int enable;
char name;
int numbers[5];
float counter;
};
appreciate any example on doing this. thank you
typedeffor your structure if you're programming in C++? That's not needed.structobjects that were going out over TCP/IP connections when our platform moved from DEC Alpha Tru64 UNIX to a mixed environment with Intel-based Windows NT machines as well. Padding changed, endian-ness changed, and evensizeofsome primitive types changed. It was a mess.