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 */
	ST_QueueData QueueData_t *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;
    QueueData_t *ptBeforeNext = 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)
    {
        data_num++;
    	tQueueDataBuffer[data_num-1].next = tQueueDataBuffer[data_num];
    }
    
	tQueueDataBuffer[data_num-1].next = tQueueDataBuffer[0];
	ptQueueDataNow = tQueueDataBuffer[0];
	ptBeforeNext = tQueueDataBuffer[data_num-1];
	
    /* 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;
                ptBeforeNext->next = ptQueueDataNow->next;                  /* dequeue */
                pn--;
            }
             
            /* Next buffer point */
            ptBeforeNext = ptQueueDataNow;
            ptQueueDataNow = ptQueueDataNow->next;
        }
    }
    else
    {
        /* error input */
    }
     
    return 0;
}

Compiler output:
main.c:10:9: error: unknown type name 'ST_QueueData'
   10 |         ST_QueueData QueueData_t *next;     /* Next Point */
      |         ^~~~~~~~~~~~
main.c:10:34: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
   10 |         ST_QueueData QueueData_t *next;     /* Next Point */
      |                                  ^
main.c: In function 'main':
main.c:31:37: error: 'QueueData_t' {aka 'struct ST_QueueData'} has no member named 'next'
   31 |         tQueueDataBuffer[data_num-1].next = tQueueDataBuffer[data_num];
      |                                     ^
main.c:34:37: error: 'QueueData_t' {aka 'struct ST_QueueData'} has no member named 'next'
   34 |         tQueueDataBuffer[data_num-1].next = tQueueDataBuffer[0];
      |                                     ^
main.c:35:26: error: incompatible types when assigning to type 'QueueData_t *' {aka 'struct ST_QueueData *'} from type 'QueueData_t' {aka 'struct ST_QueueData'}
   35 |         ptQueueDataNow = tQueueDataBuffer[0];
      |                          ^~~~~~~~~~~~~~~~
main.c:36:24: error: incompatible types when assigning to type 'QueueData_t *' {aka 'struct ST_QueueData *'} from type 'QueueData_t' {aka 'struct ST_QueueData'}
   36 |         ptBeforeNext = tQueueDataBuffer[data_num-1];
      |                        ^~~~~~~~~~~~~~~~
main.c:54:29: error: 'QueueData_t' {aka 'struct ST_QueueData'} has no member named 'next'
   54 |                 ptBeforeNext->next = ptQueueDataNow->next;                  /* dequeue */
      |                             ^~
main.c:54:52: error: 'QueueData_t' {aka 'struct ST_QueueData'} has no member named 'next'
   54 |                 ptBeforeNext->next = ptQueueDataNow->next;                  /* dequeue */
      |                                                    ^~
main.c:60:44: error: 'QueueData_t' {aka 'struct ST_QueueData'} has no member named 'next'
   60 |             ptQueueDataNow = ptQueueDataNow->next;
      |                                            ^~