title: Send() and recv() double or int
body: <p>I have problem with send and recv double/int from client to server and server to client.
  For this moment, I have:</p>
  
  <p>client:</p>
  
  <pre><code>cin&gt;&gt;xp;
  send( master,(char*)&amp;xp,sizeof(xp),0);
  </code></pre>
  
  <p>server:</p>
  
  <pre><code>int valread, nr;
  char * buffer;   
  valread = recv(s,(char *)&amp;nr,sizeof(buffer),0);
  </code></pre>
  
  <p>and it's work, but when i send from server to client i do something wrong.</p>
  
  <p>I have on server:</p>
  
  <pre><code>int lol;
  lol=5;
  send(s, (char*)&amp;lol, sizeof(lol), 0);
  </code></pre>
  
  <p>And I want this int on client:</p>
  
  <pre><code>bytesRecv = recv(master,(char*)&amp;nr,sizeof(buffer),0);
  </code></pre>
  
  <p>I don't knwo why it doesn't work :/ When I cout/printf this int on client it's 0 or 9,2555...
  Please help :/</p>