Re: C to Objective-C
Re: C to Objective-C
- Subject: Re: C to Objective-C
- From: Ryan Stevens <email@hidden>
- Date: Fri, 4 Oct 2002 08:29:58 -0700
Short answer, don't. You can call C functions from Obj-C code.
On Friday, October 4, 2002, at 07:56 AM, Jon wrote:
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.
_______________________________________________
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.