why i cant run program

why when i try run this program there is written STOPPED? :(

#include <fstream>
using namespace std;

int main () {

ofstream outfile;

outfile.open ("test.txt", ofstream::out | ofstream::app);
outfile << "hi all \n";
outfile.close();

return 0;
}
Works for me. Sure you haven't accidentally added a breakpoint or something it's stopping on?
yes im sure. My prog is just like this. Maybe i havent library?
fstream is standard library. If it compiles then you have them.

It should show no output. And create the test.txt file.
Yes but nothing is happening.
Put some cout << statements in to see if you see anything.
Its ok now. I forgot write ./ before my program name when i tryed to run it :D
=\ errr ok
Topic archived. No new replies allowed.