楼主这段代码有点问题啊,我帮你改了一下,你看看是不是这个意思:
include
include
include
using namespace std;
int main(int argc, const char * argv) {
ofstream ofile;
ofile.open(/Users/godfrey/Documents/testss.rtf, ios::out);
}
其实Xcode有自己的缓存机制,类似于虚拟机那种(比如eclipse),所以一般不用写绝对路径。但你想用绝对路径的话,就得去它缓存里找。你可以试试换个路径看看效果。
如果你想找到生成的hello.txt文件,可以打开Finder,按command+shift+g,输入 /Users/你的用户名/Library/Developer/Xcode,然后进DriverData里面找。这里面有你所有项目留下的文件,包括删掉的。找到你当前项目的文件夹,然后点进去看 Build -> Products -> Debug,hello.txt应该就在那里面了。
include
include
include
using namespace std;
int main(int argc, const char * argv) {
ofstream ofile;
ofile.open(/Users/godfrey/Documents/testss.rtf, ios::out);
}
其实Xcode有自己的缓存机制,类似于虚拟机那种(比如eclipse),所以一般不用写绝对路径。但你想用绝对路径的话,就得去它缓存里找。你可以试试换个路径看看效果。
如果你想找到生成的hello.txt文件,可以打开Finder,按command+shift+g,输入 /Users/你的用户名/Library/Developer/Xcode,然后进DriverData里面找。这里面有你所有项目留下的文件,包括删掉的。找到你当前项目的文件夹,然后点进去看 Build -> Products -> Debug,hello.txt应该就在那里面了。