Message from C, C++ discussions

December 2019

— Guys I'm running into trouble, I'm a beginner c++ programmer and I was studying sockets (Linux implementation) and I my program have this struct:

typedef struct data_header
uint8_t dh_fmt;
uint16_t dh_len;
}__attribute__((packed)) DataHeader;

The goal is to transform this in a uint8_t array, (inside a function and then return it, by reference or return statement), and obviously vice-versa since I need to convert it back when it reaches the client.

Message permanent page


Plz help me guys xD I already digged so many stack overflow threads without result that I even thinking in forfeit c++

— ðŸ‘†

— What's with this?

— It's what you see🤔

— Ugh, ty but this wouldn't solve the problem 😔

— I meant do u want the output or ur running into some errors?

— Errors while printing, the data became inconsistent with my current approach

— I need to download it on a system... Its difficult to interpret it on the mobile

— Go read it
I explained all please.

— Can u please tag the message where u explained... I wanna try it..

— Sorry neeko I don't know about the linux implementation... I am also a beginner in C