saving and reading a file of integers in objective-c
i have an array like: int array[500][2];
su开发者_高级运维ppose
array[0][0]=1; array[0][1]=2;
array[1][0]=2; array[1][1]=4;
array[2][0]=4; array[2][1]=6;
.... i'd like to write a file and read after saving it... do i have to pass all values to NSString? thanks
do i have to pass all values to NSNumber
No. You could use fread()/fwrite(), if you wanted. Or you could encode as XML.
Not enough context to be more specific.
精彩评论