title: Sending struct via Socket using JAVA and C++
body: <p>I have a socket where server is in JAVA but Client is in C++. </p>
  
  <pre><code>Struct{ 
     float length; 
     char[] name; 
  }myStruct;
  </code></pre>
  
  <p>How can I convert the structures to a byte stream sent by Server and can be correctly parsed by Client? Any sample code would help! (I heard XML is an option but I am not familiar with it )  Thanks.</p>