why cant i use fstream on mac
i have a stuff.txt file one the desktop
psuedo
#include<fstream>
ifstream in;
ofstream out;
in.open("stuff.txt");
if(in.fail()){
cout<<"failed";
}
failing WHY???
why cant i use fstream on mac
i have a stuff.txt file one the desktop
psuedo
#include<fstream>
ifstream in;
ofstream out;
in.open("stuff.txt");
if(in.fail()){
cout<<"failed";
}
failing WHY???
Does stuff.txt exist in the same directory as the program? If not use a full path.
Does stuff.txt exist in the same directory as the program? If not use a full path.
thanks!
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.