Message from C, C++ discussions

December 2019

— Of course

— 

It does make some sense though. I assume the non-zero values are mostly used for sorting purposes anyway.

— Wtf

— Brother this group is for coding enthusiast not for religious opinionz

— Hello brothers

— Hi

— /warn offtopic

— Admin Roxifasz 🇱🇹 has removed Foxner's warning.

— Fuck

— That was wrong msg

— Hehe yeah

— 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:

c++
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