fork(1) download
  1. tml.tm_sec = (int) (tm->msec / 1000);
  2. tml.tm_min = (int) tm->min;
  3. tml.tm_hour = (int)tm->hour;
  4. tml.tm_isdst = (int)tm->su;
  5. tml.tm_mday = (int)tm->mday;
  6. tml.tm_mon =(int) tm->month - 1;
  7. tml.tm_year =(int) tm->year + 100;
  8. if(&tml!=NULL)printf("Pointer is not null\n");
  9. printf("Transfer finished\n");
  10.  
  11. time_t tv=mktime(&tml);
  12. if(tv==-1)printf("error");
  13. else printf("%i",(int)tv);
  14. return tv;
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
 tml.tm_sec = (int) (tm->msec / 1000);
    ^
prog.c:2:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
  tml.tm_min = (int) tm->min;
     ^
prog.c:3:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
  tml.tm_hour = (int)tm->hour;
     ^
prog.c:4:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
  tml.tm_isdst = (int)tm->su;
     ^
prog.c:5:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
  tml.tm_mday = (int)tm->mday;
     ^
prog.c:6:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
  tml.tm_mon =(int) tm->month - 1;
     ^
prog.c:7:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
  tml.tm_year =(int) tm->year + 100;
     ^
prog.c:8:2: error: expected identifier or '(' before 'if'
  if(&tml!=NULL)printf("Pointer is not null\n");
  ^
prog.c:9:9: error: expected declaration specifiers or '...' before string constant
  printf("Transfer finished\n");
         ^
prog.c:11:2: error: unknown type name 'time_t'
  time_t tv=mktime(&tml);
  ^
prog.c:11:2: warning: implicit declaration of function 'mktime' [-Wimplicit-function-declaration]
prog.c:11:20: error: 'tml' undeclared here (not in a function)
  time_t tv=mktime(&tml);
                    ^
prog.c:12:2: error: expected identifier or '(' before 'if'
  if(tv==-1)printf("error");
  ^
prog.c:13:2: error: expected identifier or '(' before 'else'
  else printf("%i",(int)tv);
  ^
prog.c:14:2: error: expected identifier or '(' before 'return'
  return tv; 
  ^
stdout
Standard output is empty