I came across the following code and, being a C newbie, came here for your help.
This function is performed by nesting them in the queue.
Bool queuePut(Queue *q, char c)
{
void beep();
if (queueFull(q))
{
beep();
return false;
}
return true;
}
So, I get a weird error with gcc on void beep (). Can someone please explain to me what it is by declaring a function inside a function. Or is this empty beep () just out of place? I was given this code, and there is always the possibility that this is not correct.
Edit: The error I am getting is:
c:/djgpp/tmp/src/ccrjtmBh.o:queue.c:(.text+0x50): undefined reference to
'_beep'
collect 2: ld returned 1 exit status.
Is this a binding error?
nunos source
share