Ok so heres the problem:
verpa@ignare:~/Qproject$ ./Que<test
2
1 , 2
Segmentation fault (core dumped)
Yay seg fault.Well thats a bit weird so lets look at the code.
test = scanf(" %d , %u ", &name, &seconds);
printf("%d \n", test);
printf("%d , %u \n ", name, seconds);
Weird none of that should cause a seg fault whats next?
enqueue(name, seconds, queue);
Oh ok, well enqueue is a function that adds a node to a linked list it must be that but wait, the first line of enqueue?
printf("Queue");
Wait that lines not even being printed so the seg fault is happening before that? Ok....
Can any one help me with this?
Posts
Without pasting your code it'll be pretty difficult to track down the problem. "Segmentation Fault" is a pretty generic error afterall. If you have access to it, try using Visual Studios. When a program crashes due to a segmentation fault you can use VS to "debug" it and the line which is causing the problem will be pointed out to you along with all the values currently stored in your various variables.
Oops, Thrawn already said that. Not sure how I missed that.