This is a project to test some of c++'s functions and algorithms and I am unable to see the output from the console to the designated file.
#include <fstream> ///file stream
#include <iostream>
using namespace std;
const double INCREASE = 0.076;
int main()
{
double oldSalary, salary, monthlySalary, retroSalary;
//declare outdata to an output file variable
ofstream outData;
//open file
outData.open("Output.txt");
cout << "Enter current annual salary" << endl
<< "New annual salary, monthly salary, and retroactive pay will be returned: " << endl;
cin >> oldSalary; //current sallary
//calculate new annual salary
salary = oldSalary * (1+INCREASE);
//calculate new monthly salary
monthlySalary = salary/12;
//calculate retroactive pay
retroSalary = (salary - oldSalary)/2;
//print screen
cout << "New annual salary: " << salary << endl;
cout << "New monthly salary: " << monthlySalary << endl;
cout << "Retroactive salary due: " << retroSalary << endl;
//print data on file
outData << "New annual salary: " << salary << endl;
outData << "New monthly salary: " << monthlySalary << endl;
outData << "Retroactive salary due: " << retroSalary << endl;
//close file
outData.close();
cout <<endl<<endl<<endl;
return 0;
}