title: Serialize data to std::vector<uint8_t> - Protobuf C++
body: <p>I'm stuck in a simple but hurting task: data parsing in C++. I need to serialize the data content from a Protobuf object to <code>std::vector&lt;uint8_t&gt;</code>. I've seen several examples to serialize the data to <code>*void</code> or <code>char[]</code> buffers using the <code>SerializeToArray</code> method, but not for what I need. I'd like to have a hand with this, thanks for your support.</p>
  <p>Note: I need <code>std::vector&lt;uint8_t&gt;</code>, not <code>std::vector&lt;uint8_t&gt;&amp;</code> nor others.</p>