• 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
C to Objective-C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C to Objective-C


  • Subject: C to Objective-C
  • From: Jon <email@hidden>
  • Date: Fri, 4 Oct 2002 07:56:00 -0700 (PDT)

Hi,
How do I write this C call in Cocoa?

/* sample */
float Y[2];
float X[2];

X[0] = 5;
X[1] = 1;
Y[0] = 2;
X[1] = 3;

vertices(X, Y, 2);

/* Other file */

void vertices(float xVert[], float yVert[], int TOTAL)
{
int i;
for(i=0; i < TOTAL; i++) {
glTranslatef(xVert[i], yVert[i], 0.0);
}
}

I've tried - (void)verticesX:(float)xVert[] Y:yVert[]
T:(int)TOTAL; but this doesn't work in Cocoa. How
should I write it in Objective-C?

Thanks,
Jon
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
_______________________________________________
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: C to Objective-C
      • From: Manfred Lippert <email@hidden>
    • Re: C to Objective-C
      • From: Ondra Cada <email@hidden>
    • Re: C to Objective-C
      • From: Ryan Stevens <email@hidden>
    • Re: C to Objective-C
      • From: "Clark S. Cox III" <email@hidden>
    • Re: C to Objective-C
      • From: Thomas Castiglione <email@hidden>
  • Prev by Date: Re: Bochs - Free PC emulator
  • Next by Date: Re: Insert text at end of Textview
  • Previous by thread: NSColorWell & NSImageView questions.
  • Next by thread: Re: C to Objective-C
  • Index(es):
    • Date
    • Thread