fork(3) download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3. #include <string.h>
  4. #include <stdlib.h>
  5.  
  6. void wtf_1(char* data){
  7. //char str[80]={};
  8. char buf[]={"touch_out_1_2"};
  9. int device=0, timeout=0;
  10.  
  11. itoa(device, buf[10], 10);
  12. itoa(timeout, buf[12], 10);
  13.  
  14. printf ("wn: %d, %d", device, timeout);
  15.  
  16. }
  17.  
  18. void wtf_2(void){
  19. static char data[14]={0};
  20. data[0] = 'a';
  21. data[1] = 'b';
  22. data[2] = '\0';
  23.  
  24. wtf_1(data);
  25. }
  26.  
  27. int main(void) {
  28. int i;
  29. for (i = 0; i < 4; ++i)
  30. {
  31. wtf_2();
  32. }
  33.  
  34. return 0;
  35. }
  36.  
Compilation error #stdin compilation error #stdout 0s 2292KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘wtf_1’:
prog.c:11:2: warning: implicit declaration of function ‘itoa’ [-Wimplicit-function-declaration]
  itoa(device, buf[10], 10);
  ^
/home/RrK6RX/ccET60p2.o: In function `wtf_1':
prog.c:(.text+0x1b): undefined reference to `itoa'
prog.c:(.text+0x37): undefined reference to `itoa'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty