boyfarrell
Registered
Hi all,
It would be really nice for me to have an object called 'Slice' that is a matrix of a particular size. It would be really really slick programming if I could assign the number of row and columns as I go along. That is to have 'freeze-dyed image' of what a matrix is and then just add the number of rows and columns you need when you start creating instances.
Is this possible?
Have a look at the code below to see what I mean (doesn't compile):
Anybody got any tricks up there sleeves?
It would be really nice for me to have an object called 'Slice' that is a matrix of a particular size. It would be really really slick programming if I could assign the number of row and columns as I go along. That is to have 'freeze-dyed image' of what a matrix is and then just add the number of rows and columns you need when you start creating instances.
Is this possible?
Have a look at the code below to see what I mean (doesn't compile):
Code:
@interface Slice : NSObject
{
unsigned int dim1;
unsigned int dim2;
double chop[dim1][dim2];
}
-(void) setDim1To: (unsigned int) dimension1;
-(void) setDim2To: (unsigned int) dimension2;
Anybody got any tricks up there sleeves?