I've tried asking around and googling for answers. It doesn't create the .txt file in my documents folders. No matter what I tried I don't get any errors and the code runs til the end of main. 
1. my input is correct. I checked with cout.
2. I'm putting as my dir C:\users\Bryan\Documents\Points.txt

```
int main()
{
//...
std::string filename;
cout << "Enter output filename: ";
std::getline(cin, filename);

ofstream ost(filename.c_str());
if (!ost) cerr << "can't open output file: " << filename << endl;

    for(int i=0; i<points.size(); ++i)
        ost<<'('<<points[i].x<<','<<points[i].y<<')'<<endl;
        cout <<"got here 6"<<endl;
//...
}

```

I added close(), but forgot the return 0, and it worked one time.
Then I added return 0, and no matter how many times I try it, it won't create a new file, but does NOT throw errors. 
I can't see what I'm doing wrong. Anyone?

```
int main()
{
    cout <<"got here 1"<<endl;

    cout << "Please enter the file name: ";
    char name[90];
    cin.getline(name, 90);

    cout <<"got here 2"<<endl;
    ifstream ifs(name);
    if(!ifs) error("can't open input file ",name);

    vector<Point> points;
    Point p;
    while(ifs>>p)points.push_back(p);
    cout <<"got here 3"<<endl;

    for(int i=0; i<points.size(); ++i)
        cout<<'('<<points[i].x<<','<<points[i].y<<')'<<endl;

std::string filename;
cout << "Enter output filename: ";
std::getline(cin, filename);

ofstream ost(filename.c_str());
if (!ost) cerr << "can't open output file: " << filename << endl;

    for(int i=0; i<points.size(); ++i)
        ost<<'('<<points[i].x<<','<<points[i].y<<')'<<endl;
        cout <<"got here 6"<<endl;

    ost.close();

    keep_window_open();

      return 0;

   }

```