这是我的问题:我需要实现一个 FIFO/LIFO 列表堆栈作为 ADT 物种 1。我的程序是模块化的,它有一个item.h
模块:
#ifndef ITEM_H_INCLUDED
#define ITEM_H_INCLUDED
typedef struct
{
char stringa[20];
int numero;
} Item;
#endif // ITEM_H_INCLUDED
head.h
模块:
#ifndef HEAD_H_INCLUDED
#define HEAD_H_INCLUDED
#include <stdio.h>
#include <stdlib.h>
#include "item.h"
void QUEUEinit();
int QUEUEempty();
void QUEUEput_top(Item);
void QUEUEput_bottom(Item);
Item QUEUEget_top();
Item QUEUEget_bottom();
#endif // HEAD_H_INCLUDED
main.c和data.c;我需要的是我如何声明 aQEUEnode struct
和在哪里。
感谢您的帮助 :)