dynamically allocating arrays of type double
dynamically allocating arrays of type double
- Subject: dynamically allocating arrays of type double
- From: Aaron Boothello <email@hidden>
- Date: Fri, 15 Apr 2005 17:29:25 +0800
Im writing an openGL program and i need to be able to handle transformation matrices, best represented by arrays of type double. The matrices vary in size depending on the situation, so i was wonder ... how do i go about declaring and creating these dynamic arrays in objective-C ?
example(psudo):
matrix:NSObject
{
int rows, columns;
double values[rows][columns]; //rows and columns set in the iit method when a new matrix is created
}
-(id) initWithDimensions:(int)r :(int)c
{
rows = r;
columns = c;
(how do i initialize the array's values)
}
Thanks,
Aaron
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden