equal
deleted
inserted
replaced
180 return; |
180 return; |
181 } |
181 } |
182 stack->AddToStack(*item); |
182 stack->AddToStack(*item); |
183 }</codeblock> <p>as the following shows:</p> <fig id="GUID-27C947C7-3035-54A4-BA6E-C701C3007DD6"> |
183 }</codeblock> <p>as the following shows:</p> <fig id="GUID-27C947C7-3035-54A4-BA6E-C701C3007DD6"> |
184 <title>Example singly linked list</title> |
184 <title>Example singly linked list</title> |
185 <image href="GUID-BF155E49-35AF-5BC1-80C5-8D6C68C464F8_d0e306854_href.png" placement="inline"/> |
185 <image href="GUID-BF155E49-35AF-5BC1-80C5-8D6C68C464F8_d0e328079_href.png" placement="inline"/> |
186 </fig> </section> |
186 </fig> </section> |
187 <section id="GUID-CB47362B-7068-45AD-9D60-7D93174ED858"><title>Removing elements |
187 <section id="GUID-CB47362B-7068-45AD-9D60-7D93174ED858"><title>Removing elements |
188 from list</title> <p>The following code removes each <codeph>CItem</codeph> element |
188 from list</title> <p>The following code removes each <codeph>CItem</codeph> element |
189 from the list, starting with the last and working through to the first until |
189 from the list, starting with the last and working through to the first until |
190 the list is empty.</p> <codeblock id="GUID-36122717-2CA8-5E9E-B223-4921860A4027" xml:space="preserve"> while ((item = stack->RemoveFromStack()) != NULL) |
190 the list is empty.</p> <codeblock id="GUID-36122717-2CA8-5E9E-B223-4921860A4027" xml:space="preserve"> while ((item = stack->RemoveFromStack()) != NULL) |