title: C++ sending string over socket
body: <p>I'm doing a small client/server project as a final project in a C++ course. We are handed some classes that take care of communication (using sys/socket.h) and we can basically do <code>connection-&gt;send(byte)</code> to send one byte of data.</p>
  
  <p>Say I have a string that I want to send. How do I make sure an 'a' is interpreted as an 'a' when sent from client to server or vice versa? Since the standard isn't saying anything about char defaulting to unsigned or signed I don't know how to handle it.</p>
  
  <p>I had some idea that I could subtract <code>std::numeric_limits&lt;char&gt;::min()</code> on each end but I'm not sure it is a good one.</p>