//Sample Program
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
using namespace std;


int main()
{
	ofstream myFile("./data.txt");
//To append to an existing file use ofstream myFile("./data.txt", ios::app);
	if(! myFile)
	{
		cout << "Error opening output file" << endl;
		return -1;
	}
	double pi = 3.141592654;
	myFile << "The value of Pi is " << '\n' << setw(40) << pi << endl;
	myFile.close();
}
