stringstream, and the c_str() method, were designed for strings.<br>If there's a binary zero in the data it will not work very well.<br>You could convert to the textual stream or find a way to extract binary from the protocol buffer you've created. I don't know protobuf well enough to help you with that.<br>
You might try <a href="http://stackoverflow.com">stackoverflow.com</a> if you can't figure it out.<br><br><br><div class="gmail_quote">On Mon, Feb 11, 2013 at 7:23 PM, Shaun Reich <span dir="ltr"><<a href="mailto:predator106@gmail.com" target="_blank">predator106@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm using protobuf to send packets, I can serialize and deserialize them just fine in the code I link below, even if I set one of the members to 0 (e.g. set_versionminor(0). It works fine if I serialize the contents, then do ss2 << ss.str(); to put that data into another buffer which i then deserialize..</div>
</blockquote></div><br>