Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Moriquendi

macrumors newbie
Original poster
Jun 26, 2010
17
2
Hey

I want to read binary file on my iPhone.
I have .txt file witch store information about array: int[6000][9]
How can I put this data into array in my code?

I tried this:
Code:
	int mapa1[6000][9];
	
	NSFileHandle* file = [NSFileHandle fileHAndleForReadingAtPAth: @"level1.txt"];
	[[file readDataOfLength:4] getBytes:mapa1];
	mapa1 = NSSwapLittleIntToHost(mapa1);
But on the last line I receive error: "Incompatible types in assigment"
So I don't know how to copy this binary file into the array...

Can someone help me?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.