• 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
pointer value into floating point value???HELP???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pointer value into floating point value???HELP???


  • Subject: pointer value into floating point value???HELP???
  • From: Rhon Fitzwater <email@hidden>
  • Date: Wed, 27 Aug 2003 19:24:37 -0400

static float *ws1R;
static float *ws1G;
static float *ws1B;

ws1R = [timerValue intValue]; // this converts the string into an
integer// I tried it without this as well
ws1G = [[dictws1 objectForKey: @"G"]retain];
ws1G = [timerValue intValue]; // this converts the string into an
integer// I tried it without this as well
ws1B = [[dictws1 objectForKey: @"B"]retain];
ws1B = [timerValue intValue]; // this converts the string into an
integer// I tried it without this as well

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

I get this error when I build:
MyProgram.m:111: error: pointer value used where a floating point value
was expected

Is there a way to convery a pointer value to a floating point value.

I may be totally off on my thinking, but I hope you can do what I am
doing above.

Any suggestions on how to fix this?

Thanks,

-rhon
_______________________________________________
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.

  • Follow-Ups:
    • Re: pointer value into floating point value???HELP???
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: pointer value into floating point value???HELP???
      • From: Justin Anderson <email@hidden>
    • Re: pointer value into floating point value???HELP???
      • From: Brent Gulanowski <email@hidden>
  • Prev by Date: Re: Limiting a float
  • Next by Date: Confusion about transparent windows
  • Previous by thread: Re: Limiting a float
  • Next by thread: Re: pointer value into floating point value???HELP???
  • Index(es):
    • Date
    • Thread