criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<stdio.h>
struct {
  char name[12];
  int time;
} p[100000];

main(){
  int n,q,total=0,done=0;
  int i;
  scanf("%d %d",&n,&q);
  for(i=0;i<n;i++){
    scanf("%s %d",p[i].name,&p[i].time);
  }
  while(done<n){
    for(i=0;i<n;i++){
      if(0<p[i].time && p[i].time<=q){
        total += p[i].time;
        p[i] = 0;
        printf("%s %d\n",p[i].name,total);
        done++;
      }
      if(p[i].time>q){
        total += q;
        p[i].time -= q;
      }
    }
  }
}

Compiler output:
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:18:16: error: no match for 'operator=' (operand types are '<unnamed struct>' and 'int')
   18 |         p[i] = 0;
      |                ^
a.cc:2:8: note: candidate: 'constexpr<unnamed struct>&<unnamed struct>::operator=(const<unnamed struct>&)'
    2 | struct {
      |        ^
a.cc:2:8: note:   no known conversion for argument 1 from 'int' to 'const<unnamed struct>&'
a.cc:2:8: note: candidate: 'constexpr<unnamed struct>&<unnamed struct>::operator=(<unnamed struct>&&)'
a.cc:2:8: note:   no known conversion for argument 1 from 'int' to '<unnamed struct>&&'
Language: C++

#include<stdio.h>
struct process{
  char name[11];
  int time;
};

main(){
  int n,q,total=0,done=0;
  int i;
  int *pa;
  scanf("%d %d",&n,&q);
  p = (int *)calloc(n,sizeof(struct process));
  for(i=0;i<n;i++){
    scanf("%s %d",p[i].name,&p[i].time);
  }
  while(done<n){
    for(i=0;i<n;i++){
      if(0<p[i].time && p[i].time<=q){
        total += p[i].time;
        p[i].time = 0;
        printf("%s %d\n",p[i].name,total);
        done++;
      }
      if(p[i].time>q){
        total += q;
        p[i].time -= q;
      }
    }
  }
}

Compiler output:
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:12:3: error: 'p' was not declared in this scope; did you mean 'pa'?
   12 |   p = (int *)calloc(n,sizeof(struct process));
      |   ^
      |   pa
a.cc:12:14: error: 'calloc' was not declared in this scope
   12 |   p = (int *)calloc(n,sizeof(struct process));
      |              ^~~~~~
a.cc:2:1: note: 'calloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
    1 | #include<stdio.h>
  +++ |+#include <cstdlib>
    2 | struct process{
Language: C++

#include<stdio.h>
struct process{
  char name[11];
  int time;
};

main(){
  int n,q,total=0,done=0;
  int i;
  int *p;
  scanf("%d %d",&n,&q);
  p = (int *)calloc(n,sizeof(struct process));
  for(i=0;i<n;i++){
    scanf("%s %d",p[i].name,&p[i].time);
  }
  while(done<n){
    for(i=0;i<n;i++){
      if(0<p[i].time && p[i].time<=q){
        total += p[i].time;
        p[i].time = 0;
        printf("%s %d\n",p[i].name,total);
        done++;
      }
      if(p[i].time>q){
        total += q;
        p[i].time -= q;
      }
    }
  }
}

Compiler output:
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:12:14: error: 'calloc' was not declared in this scope
   12 |   p = (int *)calloc(n,sizeof(struct process));
      |              ^~~~~~
a.cc:2:1: note: 'calloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
    1 | #include<stdio.h>
  +++ |+#include <cstdlib>
    2 | struct process{
a.cc:14:24: error: request for member 'name' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   14 |     scanf("%s %d",p[i].name,&p[i].time);
      |                        ^~~~
a.cc:14:35: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   14 |     scanf("%s %d",p[i].name,&p[i].time);
      |                                   ^~~~
a.cc:18:17: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   18 |       if(0<p[i].time && p[i].time<=q){
      |                 ^~~~
a.cc:18:30: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   18 |       if(0<p[i].time && p[i].time<=q){
      |                              ^~~~
a.cc:19:23: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   19 |         total += p[i].time;
      |                       ^~~~
a.cc:20:14: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   20 |         p[i].time = 0;
      |              ^~~~
a.cc:21:31: error: request for member 'name' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   21 |         printf("%s %d\n",p[i].name,total);
      |                               ^~~~
a.cc:24:15: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   24 |       if(p[i].time>q){
      |               ^~~~
a.cc:26:14: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   26 |         p[i].time -= q;
      |              ^~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
struct process{
  char name[11];
  int time;
};

main(){
  int n,q,total=0,done=0;
  int i;
  int *p;
  scanf("%d %d",&n,&q);
  p = (int *)calloc(n,sizeof(struct process));
  for(i=0;i<n;i++){
    scanf("%s %d",p[i].name,&p[i].time);
  }
  while(done<n){
    for(i=0;i<n;i++){
      if(0<p[i].time && p[i].time<=q){
        total += p[i].time;
        p[i].time = 0;
        printf("%s %d\n",p[i].name,total);
        done++;
      }
      if(p[i].time>q){
        total += q;
        p[i].time -= q;
      }
    }
  }
}

Compiler output:
a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:15:24: error: request for member 'name' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   15 |     scanf("%s %d",p[i].name,&p[i].time);
      |                        ^~~~
a.cc:15:35: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   15 |     scanf("%s %d",p[i].name,&p[i].time);
      |                                   ^~~~
a.cc:19:17: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   19 |       if(0<p[i].time && p[i].time<=q){
      |                 ^~~~
a.cc:19:30: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   19 |       if(0<p[i].time && p[i].time<=q){
      |                              ^~~~
a.cc:20:23: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   20 |         total += p[i].time;
      |                       ^~~~
a.cc:21:14: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   21 |         p[i].time = 0;
      |              ^~~~
a.cc:22:31: error: request for member 'name' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   22 |         printf("%s %d\n",p[i].name,total);
      |                               ^~~~
a.cc:25:15: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   25 |       if(p[i].time>q){
      |               ^~~~
a.cc:27:14: error: request for member 'time' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
   27 |         p[i].time -= q;
      |              ^~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
struct process{
  char name[11];
  int time;
  struct process *nx;
};

main(){
  int n,q,total=0,done=0;
  int i;
  struct process *p,*p1;
  scanf("%d %d",&n,&q);
  p=(struct process *)malloc(sizeof(struct process));
  p1 = p;
  while(p != NULL){
    scanf("%s %d",p->name,&p->time);
    p = p->next
  }
  while(done<n){
    while(p1 != NULL){
      if(0<p1.time && p1.time<=q){
        total += p1.time;
        p1.time = 0;
        printf("%s %d\n",p1.name,total);
        done++;
      }
      if(p1.time>q){
        total += q;
        p1.time -= q;
      }
      p1 = p1->next
    }
  }
}

Compiler output:
a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:18:12: error: 'struct process' has no member named 'next'; did you mean 'nx'?
   18 |     p = p->next
      |            ^~~~
      |            nx
a.cc:22:15: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p1.time && p1.time<=q){
      |               ^~~~
a.cc:22:26: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p1.time && p1.time<=q){
      |                          ^~~~
a.cc:23:21: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   23 |         total += p1.time;
      |                     ^~~~
a.cc:24:12: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   24 |         p1.time = 0;
      |            ^~~~
a.cc:25:29: error: request for member 'name' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   25 |         printf("%s %d\n",p1.name,total);
      |                             ^~~~
a.cc:28:13: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   28 |       if(p1.time>q){
      |             ^~~~
a.cc:30:12: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   30 |         p1.time -= q;
      |            ^~~~
a.cc:32:16: error: 'struct process' has no member named 'next'; did you mean 'nx'?
   32 |       p1 = p1->next
      |                ^~~~
      |                nx
Language: C++

#include<stdio.h>
#include<stdlib.h>
struct process{
  char name[11];
  int time;
  struct process *nx;
};

main(){
  int n,q,total=0,done=0;
  int i;
  struct process *p,*p1;
  scanf("%d %d",&n,&q);
  p=(struct process *)malloc(sizeof(struct process));
  p1 = p;
  while(p != NULL){
    scanf("%s %d",p->name,&p->time);
    p = p->nx
  }
  while(done<n){
    while(p1 != NULL){
      if(0<p1.time && p1.time<=q){
        total += p1.time;
        p1.time = 0;
        printf("%s %d\n",p1.name,total);
        done++;
      }
      if(p1.time>q){
        total += q;
        p1.time -= q;
      }
      p1 = p1->nx
    }
  }
}

Compiler output:
a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:18:14: error: expected ';' before '}' token
   18 |     p = p->nx
      |              ^
      |              ;
   19 |   }
      |   ~           
a.cc:22:15: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p1.time && p1.time<=q){
      |               ^~~~
a.cc:22:26: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p1.time && p1.time<=q){
      |                          ^~~~
a.cc:23:21: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   23 |         total += p1.time;
      |                     ^~~~
a.cc:24:12: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   24 |         p1.time = 0;
      |            ^~~~
a.cc:25:29: error: request for member 'name' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   25 |         printf("%s %d\n",p1.name,total);
      |                             ^~~~
a.cc:28:13: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   28 |       if(p1.time>q){
      |             ^~~~
a.cc:30:12: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   30 |         p1.time -= q;
      |            ^~~~
a.cc:32:18: error: expected ';' before '}' token
   32 |       p1 = p1->nx
      |                  ^
      |                  ;
   33 |     }
      |     ~
Language: C++

#include<stdio.h>
#include<stdlib.h>
struct process{
  char name[11];
  int time;
  struct process *nx;
};

main(){
  int n,q,total=0,done=0;
  int i;
  struct process *p,*p1;
  scanf("%d %d",&n,&q);
  p=(struct process *)malloc(sizeof(struct process));
  p1 = *p;
  while(p != NULL){
    scanf("%s %d",p->name,&p->time);
    p = p->nx;
  }
  while(done<n){
    while(p1 != NULL){
      if(0<p1.time && p1.time<=q){
        total += p1.time;
        p1.time = 0;
        printf("%s %d\n",p1.name,total);
        done++;
      }
      if(p1.time>q){
        total += q;
        p1.time -= q;
      }
      p1 = p1->nx;
    }
  }
}

Compiler output:
a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:15:8: error: cannot convert 'process' to 'process*' in assignment
   15 |   p1 = *p;
      |        ^~
      |        |
      |        process
a.cc:22:15: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p1.time && p1.time<=q){
      |               ^~~~
a.cc:22:26: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p1.time && p1.time<=q){
      |                          ^~~~
a.cc:23:21: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   23 |         total += p1.time;
      |                     ^~~~
a.cc:24:12: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   24 |         p1.time = 0;
      |            ^~~~
a.cc:25:29: error: request for member 'name' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   25 |         printf("%s %d\n",p1.name,total);
      |                             ^~~~
a.cc:28:13: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   28 |       if(p1.time>q){
      |             ^~~~
a.cc:30:12: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   30 |         p1.time -= q;
      |            ^~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
struct process{
  char name[11];
  int time;
  struct process *nx;
};

main(){
  int n,q,total=0,done=0;
  int i;
  struct process *p,*p1;
  scanf("%d %d",&n,&q);
  p=(struct process *)malloc(sizeof(struct process));
  *p1 = *p;
  while(p != NULL){
    scanf("%s %d",p->name,&p->time);
    p = p->nx;
  }
  while(done<n){
    while(p1 != NULL){
      if(0<p1.time && p1.time<=q){
        total += p1.time;
        p1.time = 0;
        printf("%s %d\n",p1.name,total);
        done++;
      }
      if(p1.time>q){
        total += q;
        p1.time -= q;
      }
      p1 = p1->nx;
    }
  }
}

Compiler output:
a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:22:15: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p1.time && p1.time<=q){
      |               ^~~~
a.cc:22:26: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p1.time && p1.time<=q){
      |                          ^~~~
a.cc:23:21: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   23 |         total += p1.time;
      |                     ^~~~
a.cc:24:12: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   24 |         p1.time = 0;
      |            ^~~~
a.cc:25:29: error: request for member 'name' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   25 |         printf("%s %d\n",p1.name,total);
      |                             ^~~~
a.cc:28:13: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   28 |       if(p1.time>q){
      |             ^~~~
a.cc:30:12: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   30 |         p1.time -= q;
      |            ^~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
struct process{
  char name[11];
  int time;
  struct process *nx;
};

main(){
  int n,q,total=0,done=0;
  int i;
  struct process *p,*p1;
  scanf("%d %d",&n,&q);
  p=(struct process *)malloc(sizeof(struct process));
  p1 = &p;
  while(p != NULL){
    scanf("%s %d",p->name,&p->time);
    p = p->nx;
  }
  while(done<n){
    while(p1 != NULL){
      if(0<p1.time && p1.time<=q){
        total += p1.time;
        p1.time = 0;
        printf("%s %d\n",p1.name,total);
        done++;
      }
      if(p1.time>q){
        total += q;
        p1.time -= q;
      }
      p1 = p1->nx;
    }
  }
}

Compiler output:
a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:15:8: error: cannot convert 'process**' to 'process*' in assignment
   15 |   p1 = &p;
      |        ^~
      |        |
      |        process**
a.cc:22:15: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p1.time && p1.time<=q){
      |               ^~~~
a.cc:22:26: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p1.time && p1.time<=q){
      |                          ^~~~
a.cc:23:21: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   23 |         total += p1.time;
      |                     ^~~~
a.cc:24:12: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   24 |         p1.time = 0;
      |            ^~~~
a.cc:25:29: error: request for member 'name' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   25 |         printf("%s %d\n",p1.name,total);
      |                             ^~~~
a.cc:28:13: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   28 |       if(p1.time>q){
      |             ^~~~
a.cc:30:12: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   30 |         p1.time -= q;
      |            ^~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
struct process{
  char name[11];
  int time;
  struct process *nx;
};

main(){
  int n,q,total=0,done=0;
  int i;
  struct process *p,*p1;
  scanf("%d %d",&n,&q);
  p=(struct process *)malloc(sizeof(struct process));
  p1 = p;
  while(p != NULL){
    scanf("%s %d",p->name,&p->time);
    p = p->nx;
  }
  while(done<n){
    while(p1 != NULL){
      if(0<p1.time && p1.time<=q){
        total += p1.time;
        p1.time = 0;
        printf("%s %d\n",p1.name,total);
        done++;
      }
      if(p1.time>q){
        total += q;
        p1.time -= q;
      }
      p1 = p1->nx;
    }
  }
}

Compiler output:
a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:22:15: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p1.time && p1.time<=q){
      |               ^~~~
a.cc:22:26: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p1.time && p1.time<=q){
      |                          ^~~~
a.cc:23:21: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   23 |         total += p1.time;
      |                     ^~~~
a.cc:24:12: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   24 |         p1.time = 0;
      |            ^~~~
a.cc:25:29: error: request for member 'name' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   25 |         printf("%s %d\n",p1.name,total);
      |                             ^~~~
a.cc:28:13: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   28 |       if(p1.time>q){
      |             ^~~~
a.cc:30:12: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   30 |         p1.time -= q;
      |            ^~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
struct process{
  char name[11];
  int time;
  struct process *nx;
};

main(){
  int n,q,total=0,done=0;
  int i;
  struct process *p,*p1;
  scanf("%d %d",&n,&q);
  p=(struct process *)malloc(sizeof(struct process));
  while(p != NULL){
    scanf("%s %d",p->name,&p->time);
    p = p->nx;
  }
  while(done<n){
    while(p != NULL){
      if(0<p.time && p.time<=q){
        total += p.time;
        p.time = 0;
        printf("%s %d\n",p.name,total);
        done++;
      }
      if(p.time>q){
        total += q;
        p.time -= q;
      }
      p = p->nx;
    }
  }
}

Compiler output:
a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:21:14: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   21 |       if(0<p.time && p.time<=q){
      |              ^~~~
a.cc:21:24: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   21 |       if(0<p.time && p.time<=q){
      |                        ^~~~
a.cc:22:20: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |         total += p.time;
      |                    ^~~~
a.cc:23:11: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   23 |         p.time = 0;
      |           ^~~~
a.cc:24:28: error: request for member 'name' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   24 |         printf("%s %d\n",p.name,total);
      |                            ^~~~
a.cc:27:12: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   27 |       if(p.time>q){
      |            ^~~~
a.cc:29:11: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   29 |         p.time -= q;
      |           ^~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
struct process{
  char name[11];
  int time;
  struct process *nx;
};

main(){
  int n,q,total=0,done=0;
  int i;
  struct process *p;
  scanf("%d %d",&n,&q);
  p = (struct process *)malloc(sizeof(struct process));
  p1 = p
  while(p1 != NULL){
    scanf("%s %d",p1->name,&p1->time);
    p1 = p1->nx;
  }
  while(done<n){
    while(p != NULL){
      if(0<p.time && p.time<=q){
        total += p.time;
        p.time = 0;
        printf("%s %d\n",p.name,total);
        done++;
      }
      if(p.time>q){
        total += q;
        p.time -= q;
      }
      p = p->nx;
    }
  }
}

Compiler output:
a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:15:3: error: 'p1' was not declared in this scope; did you mean 'p'?
   15 |   p1 = p
      |   ^~
      |   p
a.cc:22:14: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p.time && p.time<=q){
      |              ^~~~
a.cc:22:24: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p.time && p.time<=q){
      |                        ^~~~
a.cc:23:20: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   23 |         total += p.time;
      |                    ^~~~
a.cc:24:11: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   24 |         p.time = 0;
      |           ^~~~
a.cc:25:28: error: request for member 'name' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   25 |         printf("%s %d\n",p.name,total);
      |                            ^~~~
a.cc:28:12: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   28 |       if(p.time>q){
      |            ^~~~
a.cc:30:11: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   30 |         p.time -= q;
      |           ^~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
struct process{
  char name[11];
  int time;
  struct process *nx;
};

main(){
  int n,q,total=0,done=0;
  int i;
  struct process *p,*p1;
  scanf("%d %d",&n,&q);
  p = (struct process *)malloc(sizeof(struct process));
  p1 = p;
  while(p1 != NULL){
    scanf("%s %d",p1->name,&p1->time);
    p1 = p1->nx;
  }
  while(done<n){
    while(p != NULL){
      if(0<p.time && p.time<=q){
        total += p.time;
        p.time = 0;
        printf("%s %d\n",p.name,total);
        done++;
      }
      if(p.time>q){
        total += q;
        p.time -= q;
      }
      p = p->nx;
    }
  }
}

Compiler output:
a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:22:14: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p.time && p.time<=q){
      |              ^~~~
a.cc:22:24: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p.time && p.time<=q){
      |                        ^~~~
a.cc:23:20: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   23 |         total += p.time;
      |                    ^~~~
a.cc:24:11: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   24 |         p.time = 0;
      |           ^~~~
a.cc:25:28: error: request for member 'name' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   25 |         printf("%s %d\n",p.name,total);
      |                            ^~~~
a.cc:28:12: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   28 |       if(p.time>q){
      |            ^~~~
a.cc:30:11: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   30 |         p.time -= q;
      |           ^~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
struct process{
  char name[11];
  int time;
  struct process *nx;
};

main(){
  int n,q,total=0,done=0;
  int i;
  struct process *p,*p1;
  scanf("%d %d",&n,&q);
  p = (struct process *)malloc(sizeof(struct process));
  p1 = (struct process *)malloc(sizeof(struct process));
  while(p1 != NULL){
    scanf("%s %d",p1->name,&p1->time);
    p1 = p1->nx;
  }
  while(done<n){
    while(p != NULL){
      if(0<p.time && p.time<=q){
        total += p.time;
        p.time = 0;
        printf("%s %d\n",p.name,total);
        done++;
      }
      if(p.time>q){
        total += q;
        p.time -= q;
      }
      p = p->nx;
    }
  }
}

Compiler output:
a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:22:14: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p.time && p.time<=q){
      |              ^~~~
a.cc:22:24: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   22 |       if(0<p.time && p.time<=q){
      |                        ^~~~
a.cc:23:20: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   23 |         total += p.time;
      |                    ^~~~
a.cc:24:11: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   24 |         p.time = 0;
      |           ^~~~
a.cc:25:28: error: request for member 'name' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   25 |         printf("%s %d\n",p.name,total);
      |                            ^~~~
a.cc:28:12: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   28 |       if(p.time>q){
      |            ^~~~
a.cc:30:11: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
   30 |         p.time -= q;
      |           ^~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
struct process{
  char name[11];
  int time;
  struct process *nx;
};

main(){
  int n,q,total=0,done=0;
  int i;
  struct process *p,*p1;
  scanf("%d %d",&n,&q);
  p = (struct process *)malloc(sizeof(struct process));
  p1 = p
  while(p1 != NULL){
    scanf("%s %d",p1->name,&p1->time);
    p1 = p1->nx;
  }
  while(done<n){
    while(p != NULL){
      if(0<(p->time) && (p->time)<=q){
        total += (p->time);
        p->time = 0;
        printf("%s %d\n",p->name,total);
        done++;
      }
      if((p->time)>q){
        total += q;
        p->time -= q;
      }
      p = p->nx;
    }
  }
}

Compiler output:
a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:15:9: error: expected ';' before 'while'
   15 |   p1 = p
      |         ^
      |         ;
   16 |   while(p1 != NULL){
      |   ~~~~~
Language: C++

#include <stdio.h>
struct proc{
  char name[11];
  int time;
  struct proc *nx;
};

main(){
  struct proc p[100000];
  struct proc *pa,*prepa;
  int i;
  int n,q,done=0,total=0;
  pa = p;
  scanf("%d %d",&n,&q);
  for(i=0;i<n;i++){
    scanf("%s %d",p[i].name,&p[i].time);
  }
  while(n>0){
    for(i=0;i<n;i++){
      if(pa->time <= q){
        total+=pa->time;
        printf("%s %d\n",pa->name,pa->time);
        n--;
        prepa->next = pa->next;
      }else{
        pa->time -=q;
      }
      prepa = pa;
      pa = pa->next;
    }
  }
}

Compiler output:
a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:24:16: error: 'struct proc' has no member named 'next'; did you mean 'nx'?
   24 |         prepa->next = pa->next;
      |                ^~~~
      |                nx
a.cc:24:27: error: 'struct proc' has no member named 'next'; did you mean 'nx'?
   24 |         prepa->next = pa->next;
      |                           ^~~~
      |                           nx
a.cc:29:16: error: 'struct proc' has no member named 'next'; did you mean 'nx'?
   29 |       pa = pa->next;
      |                ^~~~
      |                nx
Language: C++

#include <stdio.h>
struct proc{
  char name[11];
  int time;
  struct proc *next;
};
 
main(){
  struct proc p[100000];
  struct proc *pa,*prepa;
  int i;
  int go;
  int n,q,done=0,total=0;
  scanf("%d %d",&n,&q);
  for(i=0;i<n;i++){
    scanf("%s %d",p[i].name,&p[i].time);
  }
  while(n>0){
    pa = p;
    go = 0
    while(pa->next!=NULL){
      if(pa->time <= q){
        total+=pa->time;
        printf("%s %d\n",pa->name,pa->time);
        n--;
        if(go)prepa->next = pa->next;
      }else{
        pa->time -=q;
      }
      prepa = pa;
      go=1;
      pa = pa->next;
    }
  }
}

Compiler output:
a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:20:11: error: expected ';' before 'while'
   20 |     go = 0
      |           ^
      |           ;
   21 |     while(pa->next!=NULL){
      |     ~~~~~
Language: C++

#include <stdio.h>
struct proc{
  char name[11];
  int time;
  struct proc *next;
};
 
main(){
  struct proc *Q[100000];
  int soq=eoq=0;
}

Compiler output:
a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:11: error: 'eoq' was not declared in this scope; did you mean 'soq'?
   10 |   int soq=eoq=0;
      |           ^~~
      |           soq
Language: C++

#include <stdio.h>
#define QSIZE(100000)
void *Q[QSIZE];
int soq=0,eoq=0;

struct proc{
  char name[11];
  int time;
};

void *enQ(void *data){
  int newEnd;  
  newEnd = (eoq+1)%QSIZE;
  Q[eoq] = data;
  eoq = newEnd;
}

void *deQ(){
  int oldSt;
  if(soq==eoq){
    return NULL;
  }
  oldSt = soq;
  soq = (soq+1)/QSIZE;
  return Q[oldSt];
}

main(){
  int n,q;
  int i;
  int total = 0;
  struct proc *data;
  scanf("%d %d",&n,&q);
  for(i=0;i<n;i++){
    data = (struct proc *)malloc(sizeof(struct proc));
    scanf("%s %d",data->name,&data->time);
    enQ(data);
  }
  while(n>0){
    data = deQ();
    if(data->time>q){
      total+=q;
      data->time-=q;
      enQ(data);
    }else{
      total+=data->time
      printf("%s %d\n",data->name,data->time);
      n--;
    }
  }
}

Compiler output:
a.cc:2:15: error: expected parameter name, found "100000"
    2 | #define QSIZE(100000)
      |               ^~~~~~
a.cc:3:9: error: 'QSIZE' was not declared in this scope
    3 | void *Q[QSIZE];
      |         ^~~~~
a.cc: In function 'void* enQ(void*)':
a.cc:13:20: error: 'QSIZE' was not declared in this scope
   13 |   newEnd = (eoq+1)%QSIZE;
      |                    ^~~~~
a.cc:14:3: error: 'Q' was not declared in this scope
   14 |   Q[eoq] = data;
      |   ^
a.cc:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
   16 | }
      | ^
a.cc: In function 'void* deQ()':
a.cc:24:17: error: 'QSIZE' was not declared in this scope
   24 |   soq = (soq+1)/QSIZE;
      |                 ^~~~~
a.cc:25:10: error: 'Q' was not declared in this scope
   25 |   return Q[oldSt];
      |          ^
a.cc: At global scope:
a.cc:28:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   28 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:35:27: error: 'malloc' was not declared in this scope
   35 |     data = (struct proc *)malloc(sizeof(struct proc));
      |                           ^~~~~~
a.cc:2:1: note: 'malloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
    1 | #include <stdio.h>
  +++ |+#include <cstdlib>
    2 | #define QSIZE(100000)
a.cc:40:15: error: invalid conversion from 'void*' to 'proc*' [-fpermissive]
   40 |     data = deQ();
      |            ~~~^~
      |               |
      |               void*
a.cc:46:24: error: expected ';' before 'printf'
   46 |       total+=data->time
      |                        ^
      |                        ;
   47 |       printf("%s %d\n",data->name,data->time);
      |       ~~~~~~
Language: C++

#include <stdio.h>
#define QSIZE (100000)

void *Q[QSIZE];
int soq=0,eoq=0;

struct proc{
  char name[11];
  int time;
};

void *enQ(void *data){
  int newEnd;  
  newEnd = (eoq+1)%QSIZE;
  Q[eoq] = data;
  eoq = newEnd;
}

void *deQ(){
  int oldSt;
  if(soq==eoq){
    return NULL;
  }
  oldSt = soq;
  soq = (soq+1)/QSIZE;
  return Q[oldSt];
}

main(){
  int n,q;
  int i;
  int total = 0;
  struct proc *data;
  scanf("%d %d",&n,&q);
  for(i=0;i<n;i++){
    data = (struct proc *)malloc(sizeof(struct proc));
    scanf("%s %d",data->name,&data->time);
    enQ(data);
  }
  while(n>0){
    data = deQ();
    if(data->time>q){
      total+=q;
      data->time-=q;
      enQ(data);
    }else{
      total+=data->time
      printf("%s %d\n",data->name,data->time);
      n--;
    }
  }
}

Compiler output:
a.cc: In function 'void* enQ(void*)':
a.cc:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
   17 | }
      | ^
a.cc: At global scope:
a.cc:29:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   29 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:36:27: error: 'malloc' was not declared in this scope
   36 |     data = (struct proc *)malloc(sizeof(struct proc));
      |                           ^~~~~~
a.cc:2:1: note: 'malloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
    1 | #include <stdio.h>
  +++ |+#include <cstdlib>
    2 | #define QSIZE (100000)
a.cc:41:15: error: invalid conversion from 'void*' to 'proc*' [-fpermissive]
   41 |     data = deQ();
      |            ~~~^~
      |               |
      |               void*
a.cc:47:24: error: expected ';' before 'printf'
   47 |       total+=data->time
      |                        ^
      |                        ;
   48 |       printf("%s %d\n",data->name,data->time);
      |       ~~~~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#define QSIZE (100000)

void *Q[QSIZE];
int soq=0,eoq=0;

struct proc{
  char name[11];
  int time;
};

void *enQ(void *data){
  int newEnd;  
  newEnd = (eoq+1)%QSIZE;
  Q[eoq] = data;
  eoq = newEnd;
}

void *deQ(){
  int oldSt;
  if(soq==eoq){
    return NULL;
  }
  oldSt = soq;
  soq = (soq+1)/QSIZE;
  return Q[oldSt];
}

main(){
  int n,q;
  int i;
  int total = 0;
  struct proc *data;
  scanf("%d %d",&n,&q);
  for(i=0;i<n;i++){
    data = (struct proc *)malloc(sizeof(struct proc));
    scanf("%s %d",data->name,&data->time);
    enQ(data);
  }
  while(n>0){
    data = deQ();
    if(data->time>q){
      total+=q;
      data->time-=q;
      enQ(data);
    }else{
      total+=data->time;
      printf("%s %d\n",data->name,data->time);
      n--;
    }
  }
}

Compiler output:
a.cc: In function 'void* enQ(void*)':
a.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
   18 | }
      | ^
a.cc: At global scope:
a.cc:30:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   30 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:42:15: error: invalid conversion from 'void*' to 'proc*' [-fpermissive]
   42 |     data = deQ();
      |            ~~~^~
      |               |
      |               void*
Language: C++

#include <stdio.h>
#include <stdlib.h>
#define QSIZE (100000)

struct proc *Q[QSIZE];
int soq=0,eoq=0;

struct proc{
  char name[11];
  int time;
};

void *enQ(void *data){
  int newEnd;  
  newEnd = (eoq+1)%QSIZE;
  Q[eoq] = data;
  eoq = newEnd;
}

void *deQ(){
  int oldSt;
  if(soq==eoq){
    return NULL;
  }
  oldSt = soq;
  soq = (soq+1)/QSIZE;
  return Q[oldSt];
}

main(){
  int n,q;
  int i;
  int total = 0;
  struct proc *data;
  scanf("%d %d",&n,&q);
  for(i=0;i<n;i++){
    data = (struct proc *)malloc(sizeof(struct proc));
    scanf("%s %d",data->name,&data->time);
    enQ(data);
  }
  while(n>0){
    data = deQ();
    if(data->time>q){
      total+=q;
      data->time-=q;
      enQ(data);
    }else{
      total+=data->time;
      printf("%s %d\n",data->name,data->time);
      n--;
    }
  }
}

Compiler output:
a.cc: In function 'void* enQ(void*)':
a.cc:16:12: error: invalid conversion from 'void*' to 'proc*' [-fpermissive]
   16 |   Q[eoq] = data;
      |            ^~~~
      |            |
      |            void*
a.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
   18 | }
      | ^
a.cc: At global scope:
a.cc:30:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   30 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:42:15: error: invalid conversion from 'void*' to 'proc*' [-fpermissive]
   42 |     data = deQ();
      |            ~~~^~
      |               |
      |               void*
Language: C++

#include <stdio.h>
#include <stdlib.h>
#define QSIZE (100000)

struct proc *Q[QSIZE];
int soq=0,eoq=0;

struct proc{
  char name[11];
  int time;
};

struct proc *enQ(void *data){
  int newEnd;  
  newEnd = (eoq+1)%QSIZE;
  Q[eoq] = data;
  eoq = newEnd;
}

struct proc *deQ(){
  int oldSt;
  if(soq==eoq){
    return NULL;
  }
  oldSt = soq;
  soq = (soq+1)/QSIZE;
  return Q[oldSt];
}

main(){
  int n,q;
  int i;
  int total = 0;
  struct proc *data;
  scanf("%d %d",&n,&q);
  for(i=0;i<n;i++){
    data = (struct proc *)malloc(sizeof(struct proc));
    scanf("%s %d",data->name,&data->time);
    enQ(data);
  }
  while(n>0){
    data = deQ();
    if(data->time>q){
      total+=q;
      data->time-=q;
      enQ(data);
    }else{
      total+=data->time;
      printf("%s %d\n",data->name,data->time);
      n--;
    }
  }
}

Compiler output:
a.cc: In function 'proc* enQ(void*)':
a.cc:16:12: error: invalid conversion from 'void*' to 'proc*' [-fpermissive]
   16 |   Q[eoq] = data;
      |            ^~~~
      |            |
      |            void*
a.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
   18 | }
      | ^
a.cc: At global scope:
a.cc:30:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   30 | main(){
      | ^~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#define QSIZE (100000)

void *Q[QSIZE];
int soq=0,eoq=0;

struct proc{
  char name[11];
  int time;
};

void *enQ(struct proc *data){
  int newEnd;  
  newEnd = (eoq+1)%QSIZE;
  Q[eoq] = data;
  eoq = newEnd;
}

void *deQ(){
  int oldSt;
  if(soq==eoq){
    return NULL;
  }
  oldSt = soq;
  soq = (soq+1)/QSIZE;
  return Q[oldSt];
}

main(){
  int n,q;
  int i;
  int total = 0;
  void *data;
  scanf("%d %d",&n,&q);
  for(i=0;i<n;i++){
    data = (void *)malloc(sizeof(struct proc));
    scanf("%s %d",data->name,&data->time);
    enQ(data);
  }
  while(n>0){
    data = deQ();
    if(data->time>q){
      total+=q;
      data->time-=q;
      enQ(data);
    }else{
      total+=data->time;
      printf("%s %d\n",data->name,data->time);
      n--;
    }
  }
}

Compiler output:
a.cc: In function 'void* enQ(proc*)':
a.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
   18 | }
      | ^
a.cc: At global scope:
a.cc:30:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   30 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:38:19: error: 'void*' is not a pointer-to-object type
   38 |     scanf("%s %d",data->name,&data->time);
      |                   ^~~~
a.cc:38:31: error: 'void*' is not a pointer-to-object type
   38 |     scanf("%s %d",data->name,&data->time);
      |                               ^~~~
a.cc:39:9: error: invalid conversion from 'void*' to 'proc*' [-fpermissive]
   39 |     enQ(data);
      |         ^~~~
      |         |
      |         void*
a.cc:13:24: note:   initializing argument 1 of 'void* enQ(proc*)'
   13 | void *enQ(struct proc *data){
      |           ~~~~~~~~~~~~~^~~~
a.cc:43:8: error: 'void*' is not a pointer-to-object type
   43 |     if(data->time>q){
      |        ^~~~
a.cc:45:7: error: 'void*' is not a pointer-to-object type
   45 |       data->time-=q;
      |       ^~~~
a.cc:46:11: error: invalid conversion from 'void*' to 'proc*' [-fpermissive]
   46 |       enQ(data);
      |           ^~~~
      |           |
      |           void*
a.cc:13:24: note:   initializing argument 1 of 'void* enQ(proc*)'
   13 | void *enQ(struct proc *data){
      |           ~~~~~~~~~~~~~^~~~
a.cc:48:14: error: 'void*' is not a pointer-to-object type
   48 |       total+=data->time;
      |              ^~~~
a.cc:49:24: error: 'void*' is not a pointer-to-object type
   49 |       printf("%s %d\n",data->name,data->time);
      |                        ^~~~
a.cc:49:35: error: 'void*' is not a pointer-to-object type
   49 |       printf("%s %d\n",data->name,data->time);
      |                                   ^~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#define QSIZE (100000)

void *Q[QSIZE];
int soq=0,eoq=0;

struct proc{
  char name[11];
  int time;
};

void *enQ(void *data){
  int newEnd;  
  newEnd = (eoq+1)%QSIZE;
  Q[eoq] = data;
  eoq = newEnd;
}

void *deQ(){
  int oldSt;
  if(soq==eoq){
    return NULL;
  }
  oldSt = soq;
  soq = (soq+1)/QSIZE;
  return Q[oldSt];
}

main(){
  int n,q;
  int i;
  int total = 0;
  struct proc *data;
  scanf("%d %d",&n,&q);
  for(i=0;i<n;i++){
    data = (struct proc *)malloc(sizeof(struct proc));
    scanf("%s %d",data->name,&data->time);
    enQ(data);
  }
  while(n>0){
    data = deQ();
    if(data->time>q){
      total+=q;
      data->time-=q;
      enQ(data);
    }else{
      total+=data->time;
      printf("%s %d\n",data->name,total);
      n--;
    }
  }
}

Compiler output:
a.cc: In function 'void* enQ(void*)':
a.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
   18 | }
      | ^
a.cc: At global scope:
a.cc:30:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   30 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:42:15: error: invalid conversion from 'void*' to 'proc*' [-fpermissive]
   42 |     data = deQ();
      |            ~~~^~
      |               |
      |               void*
Language: C++

#include <stdio.h>
#include <stdlib.h>
#define QSIZE (100000)

void *Q[QSIZE];
int soq=0,eoq=0;

struct proc{
  char name[11];
  int time;
};

struct proc *enQ(struct proc *data){
  int newEnd;  
  newEnd = (eoq+1)%QSIZE;
  Q[eoq] = data;
  eoq = newEnd;
}

struct proc *deQ(){
  int oldSt;
  if(soq==eoq){
    return NULL;
  }
  oldSt = soq;
  soq = (soq+1)/QSIZE;
  return Q[oldSt];
}

main(){
  int n,q;
  int i;
  int total = 0;
  struct proc *data;
  scanf("%d %d",&n,&q);
  for(i=0;i<n;i++){
    data = (struct proc *)malloc(sizeof(struct proc));
    scanf("%s %d",data->name,&data->time);
    enQ(data);
  }
  while(n>0){
    data = deQ();
    if(data->time>q){
      total+=q;
      data->time-=q;
      enQ(data);
    }else{
      total+=data->time;
      printf("%s %d\n",data->name,total);
      n--;
    }
  }
}

Compiler output:
a.cc: In function 'proc* enQ(proc*)':
a.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
   18 | }
      | ^
a.cc: In function 'proc* deQ()':
a.cc:27:17: error: invalid conversion from 'void*' to 'proc*' [-fpermissive]
   27 |   return Q[oldSt];
      |          ~~~~~~~^
      |                 |
      |                 void*
a.cc: At global scope:
a.cc:30:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   30 | main(){
      | ^~~~