close
Re-post from the website below:
http://stackoverflow.com/questions/13531331/fopen-not-work-with-xcode
If you can't create a file by using fopen command in Xcode, like
Here are two methods to solve this problem.
1.
set the working dir:
go to: product > scheme > edit scheme...
there go to:
options tab and choose a working directory
2.
Add the path to your fopen command, show as below:
fr = fopen("/Users/User/Documents/test.txt","w");
Enjoy it and Good luck!
全站熱搜