1、请写出以下算法功能。具体要求:
(1)请先总体解释算法Function完成的功能,
(2)然后从第10行起逐行解释算法代码的含义。
#define N 100
typedef struct
{
int base[N];
int front;
int rear;
}StructA;
int Function(StructA &SA, int &e)
{
if(SA.front == SA.rear) return -1;
e = SA.base[SA.front];
SA.front = (SA.front + 1)%N;
return 0;
}