<div dir="ltr">Nice attempt Orr. ;-)<br><br><div class="gmail_quote">On Sat, Oct 25, 2008 at 5:01 PM, Orr Dunkelman <span dir="ltr"><<a href="mailto:orr.dunkelman@gmail.com">orr.dunkelman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">hi guys,<br>
<br>
I have some issues with the following code, help would be appreciated.<br>
<br>
#include <stdio.h><br>
<br>
struct Lecture {<br>
char Lecturer[80];<br>
char Topic[160];<br>
char Date[30];<br>
} lecture-str;<br>
<br>
struct Node {<br>
lecture-str data;<br>
Node *next, *prev;<br>
} node-str;<br>
<br>
struct Queue {<br>
Node First;<br>
int size;<br>
} Queue-str;<br>
<br>
/* standard stuff */<br>
<br>
int pop (Queue-str Haifux)<br>
{<br>
Node ptr*;<br>
if (Haifux->size == 0) { printf ("No lecture in queue\n"); return -1;<br>
<br>
print_node (Haifux->First);<br>
ptr=Haifux->First;<br>
Haifux->First = Hiafux->First.next;<br>
free (ptr);<br>
<br>
size --;<br>
if (size) Haifux->First.prev=NULL;<br>
}<br>
<br>
=====================================================================<br>
<br>
Well, the code failed with the error message<br>
<br>
No lecture in queue<br>
<br>
Help, somebody?<br>
<br>
--<br>
Orr Dunkelman,<br>
<a href="mailto:Orr.Dunkelman@gmail.com">Orr.Dunkelman@gmail.com</a><br>
<br>
"a scientific man ought to have no wishes, no affections, -- a mere<br>
heart of stone" - Charles Darwin.<br>
<br>
GPG fingerprint: C2D5 C6D6 9A24 9A95 C5B3 2023 6CAB 4A7C B73F D0AA<br>
(This key will never sign Emails, only other PGP keys. The key<br>
corresponds to <a href="mailto:orrd@vipe.technion.ac.il">orrd@vipe.technion.ac.il</a>)<br>
_______________________________________________<br>
Haifux mailing list<br>
<a href="mailto:Haifux@haifux.org">Haifux@haifux.org</a><br>
<a href="http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux" target="_blank">http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux</a><br>
</blockquote></div><br></div>