Search the web
Sign In
New User? Sign Up
palm-dev-forum
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: Warning messages?   Message List  
Reply | Forward Message #68860 of 92429 |
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/



Sat Feb 23, 2002 2:27 am

scott@...
Send Email Send Email

Forward
Message #68860 of 92429 |
Expand Messages Author Sort by Date

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 ...
Scott Mebberson
scott@...
Send Email
Feb 23, 2002
2:28 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help