I have a class which I'm serialising to send over a unix socket and it has to have a string which I've stored as a char array. Can I initialise it in the constructor differently to how I've done it here?
typedef struct SerialFunctionStatus_t { SerialFunctionStatus_t() : serial_rx_count(0), serial_tx_count(0), socket_rx_count(0), socket_tx_count(0) { port[0] = '\0'; } uint32_t serial_rx_count; uint32_t serial_tx_count; uint32_t socket_rx_count; uint32_t socket_tx_count; char port[20]; } SerialFunctionStatus_t;
Ruby on Rails : Cannot access an object's attributes in an array
1:
What's it called when you cast an array of objects to an array of strings?
Put
Even more lost than before - stumped with a PHP loop [closed]
This causes port to be 'value initialized' (12.6.2), which for arrays of builtins means zero initialized (8.5)..
C# Copy Array by Value
port()
in the initializer list. Even more lost than before - stumped with a PHP loop [closed]
This causes port to be 'value initialized' (12.6.2), which for arrays of builtins means zero initialized (8.5)..
C# Copy Array by Value
How to check if a certain part of the array exists in another array?