should also use sizeof(structure) Thanks, Tyler Littlefield Web: tysdomain.com email: [email protected] My programs don't have bugs, they're called randomly added features.
----- Original Message ----- From: Paul Herring To: [email protected] Sent: Thursday, May 07, 2009 2:11 AM Subject: Re: [c-prog] Re: malloc On Wed, May 6, 2009 at 6:02 AM, abcpqr70 <[email protected]> wrote: [...] > storage =(structure*) malloc(64); > > this is the way i am using it If you're using C, the cast is not necessary (and can be dangerous,) if you're using C++, you should be using new, not malloc(). -- PJH http://shabbleland.myminicity.com/com http://www.chavgangs.com/register.php?referer=9375 [Non-text portions of this message have been removed]
