Post related to the question here.
Problem: to find the right data structure for the queue:
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <time.h>
int main(int argc, const char *argv[])
{
Queue q;
ch ='A';
for (int k = 0; int k < 4; int k++) {
q.addQ(ch);
ch++;
q.addQ(ch);
ch=q.front();
q.removeQ();
}
return 0;
}
I tried to compile it, but the Queue is undeclared:
$ gcc -o Qu_1 -g q_queue.c
q_queue.c: In function 'main':
q_queue.c:8: error: 'Queue' undeclared (first use in this function)
Question: What is the library for the basic data structures such as the queue in the example?