View Single Post
mattpb99

 
Member Since: Sep 13, 2009
Posts: 2
mattpb99 is on a distinguished road

mattpb99 is offline
Just worked out what was causing my problem yesterday, it seems that if you declare
Code:
someobject* anarray[2]
this in objective C (correct me if i'm wrong) means the array size is 2
Code:
anarray[0] //valid
anarray[1] //valid
anarray[2] //invalid
This caught me out because I program in vb and the last one would be valid in that language. The data that was being written outside of the array was in fact being written to the first memory location of the next array hence when the program tried to read something from the second array and information from the double was in the NSString array the program crashed. However I then after rearranging the variables found strings from the end of the first array popping up in the beginning of the second not crashing the program as they were both the same data type.
QUOTE Thanks