// fileInput1.cc
#include <iostream>
#include <string>
#include <fstream>

using namespace std;

int main()
{
   ofstream fileOutput;
   string line;
   
   fileOutput.open("testOutput1.txt");
   
   if (fileOutput.is_open())
   {
      cout << "Please enter info to put into a file (-1 to quit): \n";
      getline(cin, line);
      
      while (line != "-1")
      {
         fileOutput << line << endl;
         cout << "Please enter info to put into a file (-1 to quit): \n";
         getline(cin, line);
      }
   } // end while
   else
   {
      cout << "ERROR: Could not open file" << endl;
      return 1;
   }
   
   fileOutput.close();
   return 0;
}