Language: C

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

#define QUEUE_DATA_MAX 100000

typedef struct ST_QueueData QueueData_t;

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

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:14:13: error: array type has incomplete element type 'QueueData_t' {aka 'struct ST_QueueData'}
   14 | QueueData_t tQueueDataBuffer[QUEUE_DATA_MAX];
      |             ^~~~~~~~~~~~~~~~
main.c: In function 'main':
main.c:45:31: error: invalid use of incomplete typedef 'QueueData_t' {aka 'struct ST_QueueData'}
   45 |             if( ptQueueDataNow->time_buff > pt )
      |                               ^~
main.c:47:31: error: invalid use of incomplete typedef 'QueueData_t' {aka 'struct ST_QueueData'}
   47 |                 ptQueueDataNow->time_buff -= pt;
      |                               ^~
main.c:52:47: error: invalid use of incomplete typedef 'QueueData_t' {aka 'struct ST_QueueData'}
   52 |                 elapsed_time += ptQueueDataNow->time_buff;
      |                                               ^~
main.c:53:49: error: invalid use of incomplete typedef 'QueueData_t' {aka 'struct ST_QueueData'}
   53 |                 printf("%s %d\n", ptQueueDataNow->name_buff, elapsed_time); /* output finished process */
      |                                                 ^~
main.c:54:31: error: invalid use of incomplete typedef 'QueueData_t' {aka 'struct ST_QueueData'}
   54 |                 ptQueueDataNow->time_buff = 0;
      |                               ^~
main.c:55:29: error: invalid use of incomplete typedef 'QueueData_t' {aka 'struct ST_QueueData'}
   55 |                 ptBeforeNext->next = ptQueueDataNow->next;                  /* dequeue */
      |                             ^~
main.c:55:52: error: invalid use of incomplete typedef 'QueueData_t' {aka 'struct ST_QueueData'}
   55 |                 ptBeforeNext->next = ptQueueDataNow->next;                  /* dequeue */
      |                                                    ^~
main.c:61:44: error: invalid use of incomplete typedef 'QueueData_t' {aka 'struct ST_QueueData'}
   61 |             ptQueueDataNow = ptQueueDataNow->next;
      |                                            ^~