I'm pulling my hair out on this one. It's been a while since I've specified a path for an ofstream. I just want a simple file called "abc.txt" in the C: folder and I want to write "abc" to it. Anyone see anything wrong? Thanks.
using namespace std;
int main ()
outs << "abc";
Should work as long as you are logged into MS-Windows with administrative privileges. If not, then the os may prevent you from writing into c:\\ root directory. Try writing that file to another directory that you know is writable.
I am using Vista Home from an admin account. No error message, but it occurs to me now that I was running it through Dev C++, so I just had a console blink. I'll try running it through a debugger or running it from a console or keeping the console open. I'm not using Vista at the moment, so I can't try it out. I'll try it out when I can and post pack. Thanks.
Okay, I am at my Vista computer again and I just ran it, again from an Admin account. Only this time it worked perfectly. I have no idea what happened before, but it works now, so...Solved. Thanks guys!