<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">&lt;<a href="mailto:orr.dunkelman@gmail.com">orr.dunkelman@gmail.com</a>&gt;</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 &lt;stdio.h&gt;<br>
<br>
struct Lecture {<br>
 &nbsp; char Lecturer[80];<br>
 &nbsp; char Topic[160];<br>
 &nbsp; char Date[30];<br>
} lecture-str;<br>
<br>
struct Node {<br>
 &nbsp; lecture-str data;<br>
 &nbsp; Node *next, *prev;<br>
} node-str;<br>
<br>
struct Queue {<br>
 &nbsp; Node First;<br>
 &nbsp; int size;<br>
} Queue-str;<br>
<br>
/* standard stuff */<br>
<br>
int pop (Queue-str Haifux)<br>
{<br>
 &nbsp; Node ptr*;<br>
 &nbsp; if (Haifux-&gt;size == 0) { printf (&quot;No lecture in queue\n&quot;); return -1;<br>
<br>
 &nbsp; print_node (Haifux-&gt;First);<br>
 &nbsp; ptr=Haifux-&gt;First;<br>
 &nbsp; Haifux-&gt;First = Hiafux-&gt;First.next;<br>
 &nbsp; free (ptr);<br>
<br>
 &nbsp; size --;<br>
 &nbsp; if (size) &nbsp; Haifux-&gt;First.prev=NULL;<br>
}<br>
<br>
=====================================================================<br>
<br>
Well, the code failed with the error message<br>
<br>
 &nbsp; 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>
&quot;a scientific man ought to have no wishes, no affections, -- a mere<br>
heart of stone&quot; - Charles Darwin.<br>
<br>
GPG fingerprint: C2D5 C6D6 9A24 9A95 C5B3 &nbsp;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>