• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: pointer value into floating point value???HELP???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pointer value into floating point value???HELP???


  • Subject: Re: pointer value into floating point value???HELP???
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Thu, 28 Aug 2003 16:14:26 +0200

At 19:24 Uhr -0400 27.08.2003, Rhon Fitzwater wrote:
static float *ws1R;
static float *ws1G;
static float *ws1B;
(snip)

NSColor *col = [NSColor colorWithCalibratedRed:(float)ws1R
green:(float)ws1G blue:(float)ws1B alpha:1.0];

colorWithCalibratedRed:green:blue:alpha: is defined as taking floats. You are passing it a float*. That's all the compiler is telling you with this error message.

If you don't know how to turn a float* (pointer-to-float) into a float (typecasting isn't the solution), you'll want to re-read the chapter on pointers in whatever C book you have, or get a good book about C programming (I always liked "Learn C on the Macintosh" by Dave Mark, though it's a little dated now) and read it there.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >pointer value into floating point value???HELP??? (From: Rhon Fitzwater <email@hidden>)

  • Prev by Date: Re: Limiting a float
  • Next by Date: Re: pointer value into floating point value???HELP???
  • Previous by thread: Re: pointer value into floating point value???HELP???
  • Next by thread: Re: pointer value into floating point value???HELP???
  • Index(es):
    • Date
    • Thread