This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: tfind
- From: Andrew Ward <anwar at ihug dot co dot nz>
- To: libc-alpha at sourceware dot org
- Date: Thu, 28 Feb 2008 17:36:03 +1300
- Subject: Re: tfind
- References: <200802281428.04079.anwar@ihug.co.nz> <47C62ACC.9080701@codesourcery.com>
Thanks for your reply Carlos. That fixed it. What is the rational behind
this as it seems pointers are the only thing you can add to the tree anyway.
Sorry if this is the wrong list but,
"public discussion about glibc development. Questions or queries about
core parts of glibc (not bugs) are appropriately discussed here."
This from the libc resources page is a little ambiguous, considering
there seems to be no 'libc-user' list.
Regards,
Andrew Ward.
Carlos O'Donell wrote:
Andrew Ward wrote:
Could someone tell me why the following program does not print
anything out. I am using gcc 4.1.3 and libc 2.6.1 on Kubuntu 7.1
The libc-alpha mailing list is for the discussion and development of
the C library. Please do not post programming questions here.
puts(((A *)found)->name);
This is incorrect. The standard says it returns a pointer to the
object. Your object is a pointer to A, so it returns a pointer to a
pointer to A. The correct code is "puts((*(A **)found)->name);"
Good luck.
Cheers,
Carlos.