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 

Screen Shot 2014-09-25 at 3.39.26 PM  

 

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!

arrow
arrow
    全站熱搜
    創作者介紹

    breadyu 發表在 痞客邦 留言(0) 人氣()