i have just discovered an easy solution to this. do a define of
#define sizeof (Int)sizeof
what this does is cast the sizeof to an int then that is passed as any
parameter you use it in. it seems kinda strange that this should be done.
anyone have any ideas on the reasoning why this method accomplishes what
sizeof is supposed to do in the first place?
-----Original Message-----
From: Sean Reigle <[EMAIL PROTECTED]>
To: Charles Rezsonya <[EMAIL PROTECTED]>
Date: Wednesday, May 31, 2000 5:57 PM
Subject: Re: strange param
>Charles.. I am having the SAME problem, I just came on to see if
>anyone else has a fix for this.. I guess the only thing I can do now
>is use #DEFINEs and not use sizeof()'s... :( Any news?
>
>Sean
>
>
>--- In [EMAIL PROTECTED], "Charles Rezsonya" <[EMAIL PROTECTED]>
>wrote:
>> i have a function i have inside a commonfunc.c (w/a header decl'ing
>it). in
>> my start i call it and the third param is a 'sizeof(struct)'. the
>sizeof
>> returns and passes its value correctly but when i call the same
>function
>> from another file (not common or starter), i pass the sizeof
>(struct) as the
>> 3rd param and it passes 0. as if the structs size is 0. now, to
>go around
>> this i decl'ed an int and before calling the func i place the
>> sizeof(mystruct) in the int. then pass that int and it works.
>>
>> does anyone have a clue why this might be happening? i
>circumvented the
>> problem but not actually solved it.
>>
>> any help appriciated.
>>
>> Charles R
>>
>>
>> --
>> For information on using the Palm Developer Forums, or to
>unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/