So for exemple if I have a struct like this:
struct Client_t {
std::string name;
uint16_t id;
};
Would it be better to have a constructor on this struct
Client_t(std::string name, uint16_t id) :
name(std::move(name)), id(id) {}
and initialise it like this:
Client_t* client = new Client_t(name, id)
or is it better to do it like this:
Client_t* client = new Client();
client->name = name;
client->id = id;