Xcode 想使用c++ 写文件 ,运行过后无文件生成
xcode吧
全部回复
仅看楼主
level 2
rukong 楼主
#include<iostream>
#include<fstream>
using namespace std;
int main(){
// ios::sync_with_stdio();
// cin.tie(0);
// cout.tie(0);
ofstream ofs;
ofs.open("1.txt",ios::out);
ofs<<"23123"<<endl;
ofs<<"dsadas"<<" "<<"dsasd"<<endl;
ofs.close();
return 0;
}
相同代码的话clion运行 就会有文件生成
2024年04月25日 11点04分 1
level 2
rukong 楼主
想问一下 大佬们 这个应该怎么改[乖]
2024年04月25日 12点04分 2
level 6
盲猜工作目录位置导致的问题
2024年04月25日 19点04分 3
1