im compiling a basic sorting algorithm that utilizies POSIX threads (pthreads) ....

everything was compiling fine, until i put the thread implementation in ....

all of a sudden, it gives me this:

[code]-bash-2.05b$ gcc project4a.c -lpthreads
project4a.c: In function `main':
project4a.c:32: subscripted value is neither array nor pointer
project4a.c:33: subscripted value is neither array nor pointer
[/code]

in regards to these lines:

[code]32: n[x] = atoi(readnum);
33: printf("%i ", n[x]);
[/code]

it is declared correctly, like this:

[code]const int MAX = 1024;
int n[51];
int tot_n;

void numsort (void arg);

int main()
{
char readnum[MAX];
.
.
.
[/code]

what error is that???? anyone?

i havent been able to find anyone to help me ....

i am looking to create a queue ....

i cant use a stack, as that is LIFO (last in, first out) ...

but i need a FIFO (first in, first out) ....

i have some code for a stack class using linked lists .... and i tried modifying the code to do FIFO, but i keep getting an error in this one spot (instead of popping the head of the stack, i would have it traverse the stack to the back and return the end ... but getting the element before the end to point to NULL, well, keeps crashing the program ....

can anyone help?