I did not understand what you told me, I mean, I am doing the project in C
not C++.

-----Mensaje original-----
De: herry <[EMAIL PROTECTED]>
Para: Palm Developer Forum <[EMAIL PROTECTED]>
Fecha: Miércoles, 31 de Enero de 2001 03:04 a.m.
Asunto: Re: static ints


>
>static variables are bound to class, not instance.  Use
>
>Test::test = 10;
>
>Unless you've instantiated that static variable outside the struct, I'm
>surprised you can even link it.
>
>
>
>> Hi to all... is there any reason for which I cannot declare this:
>> typedef struct
>> {
>>     UInt32 test;
>> } Test;
>> the problem here is in declarating the static UInt32. I do not know why
>but
>> when I do this:
>>
>> void foo (void)
>> {
>>     Test test;
>>     foo2(&test);
>>     /* here test.test will be equal to 0, why? at least in my code, what
>am
>> I doing wrong? can I declare an integer static ???? */
>> }
>>
>> void foo2 (Test * test)
>> {
>>     test->test = 10;
>> }
>
>
>
>--
>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/

Reply via email to