Thanks Joe.
Just what I was looking for. I should say that I am not only new to
programming for palm, but also in C. Thanks for your help. That was very
useful!
Thanks again.
Scott Mebberson
-----Original Message-----
From: bounce-palm-dev-forum-46917@...
[mailto:bounce-palm-dev-forum-46917@...] On Behalf Of Joe
Sent: Friday, 22 February 2002 5:17 PM
To: Palm Developer Forum
Subject: Re: Warning messages?
--- Scott Mebberson wrote:
>
> frmProjectMain.c:64: warning: assignment makes integer from pointer
> without a cast
> ...
> the line is: GlobalPrjct = num;
>
> I have defined GlobalPrjct as UInt16 GlobalPrjct; and num as static
> Char num[26];
>
> I am totally new to this, so please go easy on me.
>
Darn! What's the fun in that?
Do you understand what data types are?
You declared num to be an array of 26 Chars. In C, arrays and pointers
are very similar. You can think of num as a pointer to the first
character of that array of 26 Chars. So, num is the pointer that
Falch.net is complaining about.
You declared GlobalPrjct as an unsigned 16-bit integer.
Then you tried to assign the pointer to the integer and your compiler
warned you that that is a no-no.
Why are you trying to assign the string (num) to GlobalPrjct? If you
want to save the string in a global, do it like this:
static Char someGlobal[26];
...
StrCopy(someGlobal, num);
Hope that helps.
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
--
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/