#include<stdio.h>
#include"head.h"
#include"init.h"
#define MAX 100
/*
ypedef struct
{
sell_t sell[MAX];
int front;
int rear;
}queue_t;
*/
int enqueue(queue_t *my_queue, sell_t date)
{
//info
queue_t *myqueue = NULL;
// enqueue(my_queue, &info)
if(100 != myqueue->sell[MAX])
{
memcpy(&myqueue->sell[myqueue->rear], date, sizeof(sell_t));
queue->rear=(queue->rear+1)%MAX;
}
return 0;
}
int outqueue(queue_t *myqueue, sell_t *elem)
{//出队
if(NULL !=myqueue->sell[MAX])
{
*elem = myqueue->sell[myqueue->front];
// memset(sell, 0, sizeof(sell_t));
myqueue->front=(myqueue->front+1)%MAX;
}
return 0;
}