#include "GenericQueue.h"
typedef struct {
char name[20];
int id;
} Employee;
const size_t numberOfEmployees = 2;
Employee employees[numberOfEmployees];
GenericQueue<Employee> queues(employees, numberOfEmployees);
void setup() {
Serial.begin(115200);
queues.enqueue(Employee{"Montree", 1});
queues.enqueue(Employee{"Natvalue", 2});
queues.dequeue();
//queues.forEach(ForEach);
for (uint8_t index = 0; index < queues.size; index++) {
ForEach(ForEach, employees[index]);
}
}
void loop () {
}
void ForEach(size_t index, Employee employee) {
Serial.print("Id:");
Serial.print(employee.id);
Serial.print(" Name:");
Serial.println(employee.name);
}