проверка

This commit is contained in:
Dmitry Borisenko
2022-01-20 13:36:00 +01:00
parent c4a3dec67c
commit f893a3623d
13 changed files with 311 additions and 20 deletions

View File

@@ -0,0 +1,30 @@
#ifdef QUEUE_FROM_INST
#include "classes/QueueFromInstance.h"
QueueFromInstance::QueueFromInstance() {}
QueueFromInstance::~QueueFromInstance() {}
//добавим элемент в конец очереди
void QueueFromInstance::push(QueueInstance instance) {
queue1.push(instance);
}
//удалим элемент из начала очереди
void QueueFromInstance::pop() {
if (!queue1.empty()) {
queue1.pop();
}
}
//вернуть элемент из начала очереди и удалить его
QueueInstance QueueFromInstance::front() {
QueueInstance instance("");
if (!queue1.empty()) {
instance = queue1.front();
queue1.pop();
}
return instance;
}
// QueueFromInstance* myQueue;
#endif