title: How to serialize to char* using Google Protocol Buffers?
body: <p>I want to serialize my protocol buffer to a char*. Is this possible? I know one can serialize to file as per:</p>
  
  <pre><code>fstream output("/home/eamorr/test.bin", ios::out | ios::trunc | ios::binary);
  if (!address_book.SerializeToOstream(&amp;output)) {
    cerr &lt;&lt; "Failed to write address book." &lt;&lt; endl;
    return -1;
  }
  </code></pre>
  
  <p>But I'd like to serialize to a C-style char* for transmission across a network.</p>
  
  <p>How to do this? Please bear in mind that I'm very new to C++.</p>