ok so i have this program here i had to finish, and it was for input and output files, i wrote everything, and even wrote the data.in and data.out files but when i run it i get nothing in return. do the files have to be in the ".in" format cause when i save them, in notepad its data.in.txt
the only thing that was in data.in were four float values
but it returns blank, why? please help.
#include <fstream>
#include <iomanip>
using namespace std;
int main()
{
float val1, val2, val3, val4; //declares 4 variables
ifstream inData; // declares input stream
ofstream outData; // declares output stream
outData << fixed << showpoint;
inData.open("data.in");
outData.open("data.out");
inData >> val1 >> val2 >> val3 >> val4;
outData << val1 << endl;
outData << val2 << endl;
outData << val3 << endl;
outData << val4 << endl;
inData.close();
outData.close();
system("pause");
return 0;
}