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

Inconsequential

macrumors 68000
Original poster
Basically this is for my aero eng course, so no changing coding language 😉

Im trying to open a file from where Xcode stores the executable, IE in the debug folder.

Code:
	/* open file for input */
	inf=fopen("datafile.txt","r");

Reads it from my home folder (Where the docs folder etc is).

I would like it to read from the Debug folder in the project folder.

I've tried a few things but with no success.

Anyone help?

Cheers!
 
Edit: Ok, thats weird!!

Now it works with the full path where it didn't yesterday!!!

Oh well, all is good now.

Thanks people 🙂
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.