<quote who="Benno"> > On Sat Oct 16, 2004 at 16:21:04 +1000, Lucas King wrote: > >how does one compare two structures of the same type? > You need to either compare each element, or use memcp; eg: > > if (memcmp(&sin1, &sin2, sizeof sin1) == 0) { > > > }
and memcmp isn't usually a great idea, because most structures have padding bytes that will be uninitialised (random) data. J. -- Jan Schmidt [EMAIL PROTECTED] I came for the quality. I stayed for the freedom. -- Sean Neakums -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html