Language: C++

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

typedef unsigned int    U16;
typedef          char   C08;

#define NUM_STR_MAX       11                                     // Contain '\0'
#define OPE_STR_MAX       (NUM_STR_MAX + 7)
#define OPE_COUNT_MAX 2000000
#define INPUT_NUM_MIN 0
#define INPUT_NUM_MAX 2000000000
#define QUEUE_TOP_IDX 0

static void Insert_Num_Void(U16 *U16_Queue_p, U16 *U16_MaxNumIdx, U16 *U16_QueueEndIdx, U16 U16_InputNum);              // Function of insert the num to queue
static void Extract_Num_Void(U16 *U16_Queue_p, U16 *U16_MaxNumIdx, U16 *U16_QueueEndIdx);       // Function of extract the maximum num of queue


/***********************************************************************************
 ++module <main>
 ++outline
        main function
 ++arguments
        <>                      <>                                      []
 ++supp
         <return>
           nothing
 ++end_module
************************************************************************************/
int main(void)
{
        // Valiable declaration
        C08 C08_OpeStr[OPE_STR_MAX]   = {'\0'}; // Operation string ("insert XX", "extract", "end")
        C08 C08_InputNum[NUM_STR_MAX] = {'\0'}; // Input num(C08)
        U16 U16_InputNum    = 0;                                // Input num(U16)
        U16 *U16_Queue_p;                                               // Queue
        U16 U16_MaxNumIdx   = QUEUE_TOP_IDX;    // Max num index of queue
        U16 U16_QueueEndIdx = QUEUE_TOP_IDX;    // Index of queue end
        C08 *C08_IsOpeStrMatch_p;                               // Check the Operation
        U16 U16_i = 0;                                                  // Loop valiable
        
        // Get malloc
        U16_Queue_p = (U16 *)malloc(sizeof(U16) * OPE_COUNT_MAX);
        if(NULL == U16_Queue_p)
        {
                return 1;
        }
        
        // Initialize the queue
        for(U16_i = 0; U16_i < OPE_COUNT_MAX; U16_i++)
        {
                U16_Queue_p[U16_i] = 0;
        }
        // memset(&U16_Queue_p, OPE_COUNT_MAX, 0);
        U16_i = 0;
        
        // Input the operation
        while(U16_i < OPE_COUNT_MAX)
        {
                fgets(C08_OpeStr, OPE_STR_MAX, stdin);
                
                if( NULL != ( C08_IsOpeStrMatch_p = strstr(C08_OpeStr, "insert") ) )                    // Insert the num
                {
                        // Get the number from "C08_OpeStr"
                        strncpy(C08_InputNum, C08_OpeStr + (OPE_STR_MAX - NUM_STR_MAX), NUM_STR_MAX);
                        U16_InputNum = atoi(C08_InputNum);
                        
                        // If the input num is out of the range, do nothing
                        if(INPUT_NUM_MAX < U16_InputNum)
                        {
                                
                        }
                        else
                        {
                                // Insert the num
                                Insert_Num_Void(&U16_Queue_p[QUEUE_TOP_IDX], &U16_MaxNumIdx, &U16_QueueEndIdx, U16_InputNum);
                        }
                }
                else if( NULL != ( C08_IsOpeStrMatch_p = strstr(C08_OpeStr, "extract") ) )              // Extract the num
                {
                        // If the queue is empty, do nothing
                        if(QUEUE_TOP_IDX == U16_QueueEndIdx)
                        {
                                
                        }
                        else
                        {
                                // Extract the num
                                Extract_Num_Void(&U16_Queue_p[QUEUE_TOP_IDX], &U16_MaxNumIdx, &U16_QueueEndIdx);
                        }
                }
                else if( NULL != ( C08_IsOpeStrMatch_p = strstr(C08_OpeStr, "end") ) )                  // End
                {
                        break;
                }
                else
                {
                        // Do nothing
                }
                
                // Reset the operation string
                memset(&C08_OpeStr[0], '\0', sizeof(C08_OpeStr));
                U16_i++;
        }
        
        // Release the queue
        free(U16_Queue_p);
        
        return 0;
}

/***********************************************************************************
 ++module <Insert_Num_Void>
 ++outline
        Insert the num to queue
 ++arguments
        <U16>   <U16_Queue_p>           [Queue]
        <U16>   <U16_MaxNumIdx>         [Index of maximim num]
        <U16>   <U16_QueueEndIdx>       [Index of queue end]
        <U16>   <U16_InputNum>          [Input num]
 ++supp
         <return>
           nothing
 ++end_module
************************************************************************************/
static void Insert_Num_Void(U16 *U16_Queue_p, U16 *U16_MaxNumIdx, U16 *U16_QueueEndIdx, U16 U16_InputNum) {
        U16_Queue_p[*U16_QueueEndIdx] = U16_InputNum;                   // Insert the num
        
        // Update the max num
        if(U16_InputNum > U16_Queue_p[*U16_MaxNumIdx])
        {
                *U16_MaxNumIdx = *U16_QueueEndIdx;
        }
        
        // Update the end index
        (*U16_QueueEndIdx)++;
//        *U16_QueueEndIdx += sizeof(U16);
        
        return;
}


/***********************************************************************************
 ++module <Extract_Num_Void>
 ++outline
        Extract the maximum num of queue  ++arguments
        <U16>   <U16_Queue_p>           [Queue pointer]
        <U16>   <U16_MaxNumIdx>         [Index of maximim num]
        <U16>   <U16_QueueEndIdx>       [Index of queue end]
 ++supp
         <return>
           nothing
 ++end_module
************************************************************************************/
static void Extract_Num_Void(U16 *U16_Queue_p, U16 *U16_MaxNumIdx, U16 *U16_QueueEndIdx) {
        U16 U16_i;
        
        printf("%d\n", U16_Queue_p[*U16_MaxNumIdx]);                           // Disp the max num
        
        // Update the queue
        U16_i = (*U16_MaxNumIdx) + 1;
//        U16_i = (*U16_MaxNumIdx) + sizeof(U16);
        while(1)
        {
                U16_Queue_p[U16_i - 1] = U16_Queue_p[U16_i];
//                U16_Queue_p[U16_i - sizeof(U16)] = U16_Queue_p[U16_i];
                
                if(U16_i == *U16_QueueEndIdx)
                {
                        // Update queue end
                        U16_Queue_p[U16_i] = 0;
                        (*U16_QueueEndIdx)--;
//                        *U16_QueueEndIdx -= sizeof(U16);
                        break;
                }
                U16_i++;
        }
        
        // Update the maximim num
        *U16_MaxNumIdx = QUEUE_TOP_IDX;
        U16_i          = (*U16_MaxNumIdx) + 1;
//        U16_i          = (*U16_MaxNumIdx) + sizeof(U16);
        
        while(1)
        {
                if(U16_Queue_p[U16_i] > U16_Queue_p[*U16_MaxNumIdx])
                {
                        *U16_MaxNumIdx = U16_i;
                }
                
                // If "U16_i" is "U16_QueueEndIdx", break
                // If "U16_i" is not "U16_QueueEndIdx", update "U16_i"
                if(U16_i == *U16_QueueEndIdx)
                {
                        break;
                }
                else
                {
                        U16_i++;
//                        U16_i += sizeof(U16);
                }
        }
        
        return;
}


/*
insert 8
insert 2
extract
insert 10
extract
insert 11
extract
extract
end
*/


________________________________________
差出人: Hayashi，Shinya / 林慎也 <shinya.hayashi.na@hitachi-automotive.co.jp>
送信日時: 2018年5月18日 13:05
宛先: 林　慎也
CC: Hayashi，Shinya / 林慎也
件名: QE活動コード (ALDS1_9_C) 2871699

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

typedef unsigned long   U32;
typedef                  char   C08;

#define NUM_STR_MAX       11                                    // Contain '\0'
#define OPE_STR_MAX       (NUM_STR_MAX + 7)
#define OPE_COUNT_MAX 2000000
#define INPUT_NUM_MIN 0
#define INPUT_NUM_MAX 2000000000
#define QUEUE_TOP_IDX 0

static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum);              // Function of insert the num to queue
static void Extract_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx);       // Function of extract the maximum num of queue


/***********************************************************************************
 ++module <main>
 ++outline
        main function
 ++arguments
        <>                      <>                                      []
 ++supp
        <return>
          nothing
 ++end_module
************************************************************************************/
int main(void)
{
        // Valiable declaration
        C08 C08_OpeStr[OPE_STR_MAX]   = {'\0'}; // Operation string ("insert XX", "extract", "end")
        C08 C08_InputNum[NUM_STR_MAX] = {'\0'}; // Input num(C08)
        U32 U32_InputNum    = 0;                                // Input num(U32)
        U32 *U32_Queue_p;                                               // Queue
        U32 U32_MaxNumIdx   = QUEUE_TOP_IDX;    // Max num index of queue
        U32 U32_QueueEndIdx = QUEUE_TOP_IDX;    // Index of queue end
        C08 *C08_IsOpeStrMatch_p;                               // Check the Operation
        U32 U32_i = 0;                                                  // Loop valiable

        // Get malloc
        U32_Queue_p = (U32 *)malloc(sizeof(U32) * OPE_COUNT_MAX);
        if(NULL == U32_Queue_p)
        {
                return 1;
        }

        printf("Size = %ld\n", sizeof(U32_Queue_p));
        printf("Size = %d\n", OPE_COUNT_MAX);
        printf("Size = %ld\n", sizeof(U32));

        // Initialize the queue
        for(U32_i = 0; U32_i < OPE_COUNT_MAX; U32_i++)
        {
                U32_Queue_p[U32_i] = 0;
        }
        // memset(&U32_Queue_p, OPE_COUNT_MAX, 0);
        U32_i = 0;

        // Input the operation
        while(U32_i < OPE_COUNT_MAX)
        {
                fgets(C08_OpeStr, OPE_STR_MAX, stdin);

                if( NULL != ( C08_IsOpeStrMatch_p = strstr(C08_OpeStr, "insert") ) )                    // Insert the num
                {
                        printf("insert\n");
                        // Get the number from "C08_OpeStr"
                        strncpy(C08_InputNum, C08_OpeStr + (OPE_STR_MAX - NUM_STR_MAX), NUM_STR_MAX);
                        U32_InputNum = atoi(C08_InputNum);

                        // If the input num is out of the range, do nothing
                        if(INPUT_NUM_MAX < U32_InputNum)
                        {

                        }
                        else
                        {
                                // Insert the num
                                Insert_Num_Void(&U32_Queue_p[QUEUE_TOP_IDX], &U32_MaxNumIdx, &U32_QueueEndIdx, U32_InputNum);
                        }
                }
                else if( NULL != ( C08_IsOpeStrMatch_p = strstr(C08_OpeStr, "extract") ) )              // Extract the num
                {
                        printf("extract\n");
                        // If the queue is empty, do nothing
                        if(QUEUE_TOP_IDX == U32_QueueEndIdx)
                        {

                        }
                        else
                        {
                                // Extract the num
                                Extract_Num_Void(&U32_Queue_p[QUEUE_TOP_IDX], &U32_MaxNumIdx, &U32_QueueEndIdx);
                        }
                }
                else if( NULL != ( C08_IsOpeStrMatch_p = strstr(C08_OpeStr, "end") ) )                  // End
                {
                        printf("end\n");
                        break;
                }
                else
                {
                        printf("else\n");
                        // Do nothing
                }

                // Reset the operation string
                memset(&C08_OpeStr[0], '\0', sizeof(C08_OpeStr));
                U32_i++;
        }

        // Release the queue
        free(U32_Queue_p);

        return 0;
}

/***********************************************************************************
 ++module <Insert_Num_Void>
 ++outline
        Insert the num to queue
 ++arguments
        <U32>   <U32_Queue_p>           [Queue]
        <U32>   <U32_MaxNumIdx>         [Index of maximim num]
        <U32>   <U32_QueueEndIdx>       [Index of queue end]
        <U32>   <U32_InputNum>          [Input num]
 ++supp
        <return>
          nothing
 ++end_module
************************************************************************************/
static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum) {
        U32_Queue_p[*U32_QueueEndIdx] = U32_InputNum;                   // Insert the num
        printf("Queue[%ld] = %ld\n", *U32_QueueEndIdx, U32_Queue_p[*U32_QueueEndIdx]);

        // Update the max num
        if(U32_InputNum > U32_Queue_p[*U32_MaxNumIdx])
        {
                *U32_MaxNumIdx = *U32_QueueEndIdx;
        }

        // Update the end index
//      (*U32_QueueEndIdx)++;

        return;
}


/***********************************************************************************
 ++module <Extract_Num_Void>
 ++outline
        Extract the maximum num of queue  ++arguments
        <U32>   <U32_Queue_p>           [Queue pointer]
        <U32>   <U32_MaxNumIdx>         [Index of maximim num]
        <U32>   <U32_QueueEndIdx>       [Index of queue end]
 ++supp
        <return>
          nothing
 ++end_module
************************************************************************************/
static void Extract_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx) {
        U32 U32_i;

        printf("%ld\n", U32_Queue_p[*U32_MaxNumIdx]);                           // Disp the max num

        // Update the queue
        U32_i = (*U32_MaxNumIdx) + 1;
        while(1)
        {
                U32_Queue_p[U32_i - 1] = U32_Queue_p[U32_i];

                if(U32_i == *U32_QueueEndIdx)
                {
                        // Update queue end
                        U32_Queue_p[U32_i] = 0;
                        (*U32_QueueEndIdx)--;
                        break;
                }
                U32_i++;
        }

        // Update the maximim num
        *U32_MaxNumIdx = QUEUE_TOP_IDX;
        U32_i          = (*U32_MaxNumIdx) + 1;

        while(1)
        {
                if(U32_Queue_p[U32_i] > U32_Queue_p[*U32_MaxNumIdx])
                {
                        *U32_MaxNumIdx = U32_i;
                }

                // If "U32_i" is "U32_QueueEndIdx", break
                // If "U32_i" is not "U32_QueueEndIdx", update "U32_i"
                if(U32_i == *U32_QueueEndIdx)
                {
                        break;
                }
                else
                {
                        U32_i++;
                }
        }

        return;
}


/*
insert 8
insert 2
extract
insert 10
extract
insert 11
extract
extract
end
*/



Compiler output:
a.cc:222:52: error: stray '@' in program
  222 | 差出人: Hayashi，Shinya / 林慎也 <shinya.hayashi.na@hitachi-automotive.co.jp>
      |                                                    ^
a.cc:224:7: error: extended character 　 is not valid in an identifier
  224 | 宛先: 林　慎也
      |       ^
a.cc:221:1: error: '________________________________________' does not name a type
  221 | ________________________________________
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:242:13: error: variable or field 'Insert_Num_Void' declared void
  242 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum);              // Function of insert the num to queue
      |             ^~~~~~~~~~~~~~~
a.cc:242:29: error: 'U32' was not declared in this scope
  242 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum);              // Function of insert the num to queue
      |                             ^~~
a.cc:242:34: error: 'U32_Queue_p' was not declared in this scope
  242 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum);              // Function of insert the num to queue
      |                                  ^~~~~~~~~~~
a.cc:242:47: error: 'U32' was not declared in this scope
  242 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum);              // Function of insert the num to queue
      |                                               ^~~
a.cc:242:52: error: 'U32_MaxNumIdx' was not declared in this scope
  242 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum);              // Function of insert the num to queue
      |                                                    ^~~~~~~~~~~~~
a.cc:242:67: error: 'U32' was not declared in this scope
  242 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum);              // Function of insert the num to queue
      |                                                                   ^~~
a.cc:242:72: error: 'U32_QueueEndIdx' was not declared in this scope
  242 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum);              // Function of insert the num to queue
      |                                                                        ^~~~~~~~~~~~~~~
a.cc:242:89: error: 'U32' was not declared in this scope
  242 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum);              // Function of insert the num to queue
      |                                                                                         ^~~
a.cc:243:13: error: variable or field 'Extract_Num_Void' declared void
  243 | static void Extract_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx);       // Function of extract the maximum num of queue
      |             ^~~~~~~~~~~~~~~~
a.cc:243:30: error: 'U32' was not declared in this scope
  243 | static void Extract_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx);       // Function of extract the maximum num of queue
      |                              ^~~
a.cc:243:35: error: 'U32_Queue_p' was not declared in this scope
  243 | static void Extract_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx);       // Function of extract the maximum num of queue
      |                                   ^~~~~~~~~~~
a.cc:243:48: error: 'U32' was not declared in this scope
  243 | static void Extract_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx);       // Function of extract the maximum num of queue
      |                                                ^~~
a.cc:243:53: error: 'U32_MaxNumIdx' was not declared in this scope
  243 | static void Extract_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx);       // Function of extract the maximum num of queue
      |                                                     ^~~~~~~~~~~~~
a.cc:243:68: error: 'U32' was not declared in this scope
  243 | static void Extract_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx);       // Function of extract the maximum num of queue
      |                                                                    ^~~
a.cc:243:73: error: 'U32_QueueEndIdx' was not declared in this scope
  243 | static void Extract_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx);       // Function of extract the maximum num of queue
      |                                                                         ^~~~~~~~~~~~~~~
a.cc:257:5: error: redefinition of 'int main()'
  257 | int main(void)
      |     ^~~~
a.cc:30:5: note: 'int main()' previously defined here
   30 | int main(void)
      |     ^~~~
a.cc: In function 'int main()':
a.cc:262:9: error: 'U32' was not declared in this scope
  262 |         U32 U32_InputNum    = 0;                                // Input num(U32)
      |         ^~~
a.cc:263:14: error: 'U32_Queue_p' was not declared in this scope
  263 |         U32 *U32_Queue_p;                                               // Queue
      |              ^~~~~~~~~~~
a.cc:264:12: error: expected ';' before 'U32_MaxNumIdx'
  264 |         U32 U32_MaxNumIdx   = QUEUE_TOP_IDX;    // Max num index of queue
      |            ^~~~~~~~~~~~~~
      |            ;
a.cc:265:12: error: expected ';' before 'U32_QueueEndIdx'
  265 |         U32 U32_QueueEndIdx = QUEUE_TOP_IDX;    // Index of queue end
      |            ^~~~~~~~~~~~~~~~
      |            ;
a.cc:267:12: error: expected ';' before 'U32_i'
  267 |         U32 U32_i = 0;                                                  // Loop valiable
      |            ^~~~~~
      |            ;
a.cc:270:29: error: expected primary-expression before ')' token
  270 |         U32_Queue_p = (U32 *)malloc(sizeof(U32) * OPE_COUNT_MAX);
      |                             ^
a.cc:281:13: error: 'U32_i' was not declared in this scope
  281 |         for(U32_i = 0; U32_i < OPE_COUNT_MAX; U32_i++)
      |             ^~~~~
a.cc:286:9: error: 'U32_i' was not declared in this scope
  286 |         U32_i = 0;
      |         ^~~~~
a.cc:298:25: error: 'U32_InputNum' was not declared in this scope; did you mean 'C08_InputNum'?
  298 |                         U32_InputNum = atoi(C08_InputNum);
      |                         ^~~~~~~~~~~~
      |                         C08_InputNum
a.cc:308:79: error: 'U32_MaxNumIdx' was not declared in this scope
  308 |                                 Insert_Num_Void(&U32_Queue_p[QUEUE_TOP_IDX], &U32_MaxNumIdx, &U32_QueueEndIdx, U32_InputNum);
      |                                                                               ^~~~~~~~~~~~~
a.cc:308:95: error: 'U32_QueueEndIdx' was not declared in this scope
  308 |                                 Insert_Num_Void(&U32_Queue_p[QUEUE_TOP_IDX], &U32_MaxNumIdx, &U32_QueueEndIdx, U32_InputNum);
      |                                                                                               ^~~~~~~~~~~~~~~
a.cc:315:45: error: 'U32_QueueEndIdx' was not declared in this scope
  315 |                         if(QUEUE_TOP_IDX == U32_QueueEndIdx)
      |                                             ^~~~~~~~~~~~~~~
a.cc:322:80: error: 'U32_MaxNumIdx' was not declared in this scope
  322 |                                 Extract_Num_Void(&U32_Queue_p[QUEUE_TOP_IDX], &U32_MaxNumIdx, &U32_QueueEndIdx);
      |                                                                                ^~~~~~~~~~~~~
a.cc: At global scope:
a.cc:361:13: error: variable or field 'Insert_Num_Void' declared void
  361 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum) {
      |             ^~~~~~~~~~~~~~~
a.cc:361:29: error: 'U32' was not declared in this scope
  361 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum) {
      |                             ^~~
a.cc:361:34: error: 'U32_Queue_p' was not declared in this scope
  361 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum) {
      |                                  ^~~~~~~~~~~
a.cc:361:47: error: 'U32' was not declared in this scope
  361 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum) {
      |                                               ^~~
a.cc:361:52: error: 'U32_MaxNumIdx' was not declared in this scope
  361 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum) {
      |                                                    ^~~~~~~~~~~~~
a.cc:361:67: error: 'U32' was not declared in this scope
  361 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum) {
      |                                                                   ^~~
a.cc:361:72: error: 'U32_QueueEndIdx' was not declared in this scope
  361 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum) {
      |                                                                        ^~~~~~~~~~~~~~~
a.cc:361:89: error: 'U32' was not declared in this scope
  361 | static void Insert_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx, U32 U32_InputNum) {
      |                                                                                         ^~~
a.cc:390:13: error: variable or field 'Extract_Num_Void' declared void
  390 | static void Extract_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx) {
      |             ^~~~~~~~~~~~~~~~
a.cc:390:30: error: 'U32' was not declared in this scope
  390 | static void Extract_Num_Void(U32 *U32_Queue_p, U32 *U32_MaxNumIdx, U32 *U32_QueueEndIdx) {
      |                              ^~~
a.cc:390:35: error: 'U32_Queue_p' was not declared in this scope
  390 | static void Extract_Num_Vo