开发者

saving and reading a file of integers in objective-c

开发者 https://www.devze.com 2023-02-11 08:56 出处:网络
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;

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消