26 lines
479 B
C++

#ifndef STACK_H
#define STACK_H // STACK_H
#include <stdbool.h>
#include <sys/types.h>
#include "server_structs.h"
class Stack {
private:
api_packet *data;
size_t capacity;
int top;
public:
Stack(size_t size);
~Stack();
bool isEmpty();
bool isFull();
bool push(const api_packet &item);
bool pop(api_packet &item);
bool peek(api_packet &item);
size_t size();
};
#endif // STACK_H