Language: C

#include <stdio.h>
#include <string.h>

#define QUEUE_DATA_MAX 100000

typedef struct ST_QueueData
{
    char name_buff[10];     /* Name Buffer */
    int  time_buff;         /* Time Buffer */
	int  *next;             /* Next Point */
}QueueData_t;

QueueData_t tQueueDataBuffer[QUEUE_DATA_MAX];

int main(void)
{
    int  pn;                      /* process num */
    int  pt;                      /* process time */
    int  data_num = 0;
    int  elapsed_time = 0;
    int  *before_next = 0;        /* Befor Next Point */
    QueueData_t *ptQueueDataNow;  /* Now Queue Data Point */
    
    /* get "process num" & "process time" */
    scanf("%d %d", &pn, &pt);
     
    /* get Name & time */
    while((scanf("%s %d", tQueueDataBuffer[data_num].name_buff, &(tQueueDataBuffer[data_num].time_buff)) != EOF) && data_num < QUEUE_DATA_MAX)
    {
    	if(data_num > 0)
    	{
            tQueueDataBuffer[data_num-1].next = tQueueDataBuffer[data_num];
    	}
    	else
    	{
    		/* Nothing */
    	}
        data_num++;
    }
    
	tQueueDataBuffer[data_num-1].next = tQueueDataBuffer[0];
	ptQueueDataNow = tQueueDataBuffer[0];
	before_next = tQueueDataBuffer[data_num-1].next;
	
    /* get Data Num equal process num */
    if( data_num == pn )
    {
        while(pn > 0)
        {
            /* remain process time */
            if( ptQueueDataNow->time_buff > pt )
            {
                ptQueueDataNow->time_buff -= pt;
                elapsed_time += pt;
            }
            else
            {
                elapsed_time += ptQueueDataNow->time_buff;
                printf("%s %d\n", ptQueueDataNow->name_buff, elapsed_time); /* output finished process */
                ptQueueDataNow->time_buff = 0;
                before_next = ptQueueDataNow->next;                         /* dequeue */
                pn--;
            }
             
            /* Next buffer point */
            before_next = ptQueueDataNow;
            ptQueueDataNow = ptQueueDataNow->next;
        }
    }
    else
    {
        /* error input */
    }
     
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:32:49: error: incompatible types when assigning to type 'int *' from type 'QueueData_t' {aka 'struct ST_QueueData'}
   32 |             tQueueDataBuffer[data_num-1].next = tQueueDataBuffer[data_num];
      |                                                 ^~~~~~~~~~~~~~~~
main.c:41:45: error: incompatible types when assigning to type 'int *' from type 'QueueData_t' {aka 'struct ST_QueueData'}
   41 |         tQueueDataBuffer[data_num-1].next = tQueueDataBuffer[0];
      |                                             ^~~~~~~~~~~~~~~~
main.c:42:26: error: incompatible types when assigning to type 'QueueData_t *' {aka 'struct ST_QueueData *'} from type 'QueueData_t' {aka 'struct ST_QueueData'}
   42 |         ptQueueDataNow = tQueueDataBuffer[0];
      |                          ^~~~~~~~~~~~~~~~
main.c:66:25: error: assignment to 'int *' from incompatible pointer type 'QueueData_t *' {aka 'struct ST_QueueData *'} [-Wincompatible-pointer-types]
   66 |             before_next = ptQueueDataNow;
      |                         ^
main.c:67:28: error: assignment to 'QueueData_t *' {aka 'struct ST_QueueData *'} from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   67 |             ptQueueDataNow = ptQueueDataNow->next;
      |                            ^