fork download
  1. while((ent = readdir(dir)) != NULL){
  2. if(strcmp(ent->d_name, ".") == 0) continue;
  3. if(strcmp(ent->d_name, "..") == 0) continue;
  4. write(sock, ent->d_name, strlen(ent->d_name));
  5. }
  6.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:5: error: expected identifier or '(' before 'while'
     while((ent = readdir(dir)) != NULL){
     ^
stdout
Standard output is empty