Barry Gold <[EMAIL PROTECTED]> wrote:
> Barry Gold wrote:
> > Or if you're in C instead of C++,
> >
> > ...
> > pData = malloc(sizeof(DATA));
> > ...
> > free(pData);
> > ...
>
> Oops, forgot, if you're in C then struct DATA doesn't
> declare "DATA" as a type, only as a struct tag.  So the above
> malloc should read:
>
> pData = malloc(sizeof(struct DATA));

In C, you can avoid the type size problem by...

  pData = malloc(sizeof *pData);

--
Peter





To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=298184.5639630.6699735.3001176/D=groups/S=:HM/A=2434971/rand=355917973


Yahoo! Groups Links

Reply via email to