boyfarrell
Registered
Hi everybody,
I have create a class called TwoColumns:
I have now created a second class that inherits from this called ArrayOfTwoColumns:
When I come to use the ArrayOfTwoColumns class I initialise it as normal:
However, when I look in the debugger this doesn't seem to initialise the values of the instance variables of TwoColumns (xColumn and yColumn) contained within ArrayOfTwoColumns - the're not zero? In order for me to use myArrayOfTwoColumns I have to zero the data manually in the main function. A method doesn't seem to be able to zero the data. It must be done from the main function. Any idea what is going on?
In fact I have simplified my code here by renaming things and cutting stuff out it is slightly more complicated but only in terms of accessing the array elements - the problem boils down to what I have written above. If the above is impossible then the problem must be with 'some of the details'.
Any ideas?
Daniel
I have create a class called TwoColumns:
Code:
@interface TwoColumns : MyClass
{
double xColumn[201];
double yColumn[201];
}
Code:
@interface ArrayOfTwoColumns : TwoColumns
{
TwoColumns* holder[5][5][5];
}
Code:
ArrayOfTwoColumns *myArrayOfTwoColumns = [[ArrayOfTwoColumns alloc] init];
In fact I have simplified my code here by renaming things and cutting stuff out it is slightly more complicated but only in terms of accessing the array elements - the problem boils down to what I have written above. If the above is impossible then the problem must be with 'some of the details'.
Any ideas?
Daniel