BugInTheSYS

Untitled

Oct 1st, 2011
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1.     // Client, send:
  2.     char *BufferToSend;
  3.     float FloatToSend = 4.42;
  4.     BufferToSend = ( char* )&FloatToSend;
  5.      
  6.     send( Connect, BufferToSend, sizeof(float), 0 );
  7.      
  8.     // Server, recieve:
  9.     recv( Connect, myBuffer, recvbuflen, 0 );
  10.     float *x;
  11.     x = &myBuffer;
  12.     // *x is now the float you've sent up there, so you can now do:
  13.  
  14.     float a = *x + 320.0f;
  15.     // etc...
  16.  
Advertisement
Add Comment
Please, Sign In to add comment