Creating Circular Buffer lib

nick_p:
Actually, I'm having a little trouble passing on arguments to an function called inside another one...

void queueAdd(queue *q, char *task) {

if (queueDuplicateExists) return;
  if (queueIsFull) return;   
  else {
      int tail = (q->head + q->count) % q->size;
      q->tasks[tail] = *task;
      ++ q->count; } }




How can I correctly pass the queue to the test functions inside the queueAdd function?

If you're trying to call a function or method, you need to put parentheses () after the function/method name.

The logic you have there to check for duplicates and queue full conditions and increment pointers and so on would IMO be much better encapsulated into a CircularBuffer class rather than as a struct with separate independent functions.