Guest User

Untitled

a guest
Jun 23rd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. int xloc = 100;
  2. int yloc = 100;
  3.  
  4. char * sendBuf = malloc(100);
  5.  
  6. char * toSend = "LOC";
  7.  
  8. strcpy(toSend,sendBuf);
  9. itoa(xloc,sendBuf[strlen(toSend));
  10.  
  11. OR
  12.  
  13. sprintf(sendBuf, "%s,%d",toSend,xloc);
  14.  
  15. iprintf("%s",sendBuf);
  16.  
  17. send(my_socket, sendBuf, strlen(sendBuf), 0);
Add Comment
Please, Sign In to add comment