|
From: Ioannis V. <iv...@em...> - 2003-06-08 12:39:33
|
> -----Original Message-----
> From: Per Westermark [mailto:pw...@ia...]
> Sent: Saturday, June 07, 2003 10:39 PM
> To: Ioannis Vranos
> Cc: 'Dev-Cpp-Users'
> Subject: RE: [Dev-C++] Single Linked List-IV
>
>
> The slstore() function DOES need it's last line, or else the
> list will not
> get a pointer to the last element. The pointer to the last
> element is used
> to allow insert of new elements last, without having to
> iterate throught
> the list.
Perhaps I am missing something but as I understand it the statement
*last_arg=i;
makes the preceding statement
else
(*last_arg)->next=i;
redundant.
>
> I know it's a bit extra noisy with dual indirection, but
> since the code
> is C and not C++, slstore() can't take references to pointers.
And? double pointers occupy space themselves too.
Ioannis Vranos
* Programming pages: http://www.noicys.freeurl.com
* Alternative URL 1: http://run.to/noicys
* Alternative URL 2: http://www.noicys.cjb.net
|