At 12:40 PM 8/6/2004, Gláucio Barizon Pançardes <[EMAIL PROTECTED]> wrote:
sorry for the few information! I am using codewarrior 8.0 to compile my
projects and in this I break up of codigo meeting the following error!

I want to use the macro offsetof!!!

Code:

UInt16 offset = offsetof(PackedCliente, nome);

Error   : function has no prototype
DBrecordMain.c line 297       UInt16 offset = offsetof(PackedCliente, nome);

So i try use

#include <cstddef> and  #include<stddef.h>

and the compile dont understand!!!
dont find the file!!!

Yes, I believe offsetof wasn't included until 9.0. Prior to that, we used the following definition:


#ifndef offsetof
#define offsetof(type, member)  ((size_t) &(((type *) 0)->member))
#endif

Greg Lutz
NearSpace, Inc.



-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to