Question: #include #include #include using namespace std; int main ( ) { ifstream inputFile; ofstream outputFile; inputFile.open ( FahrenheitTemperature . txt ) ; if
#include
#include
#include
using namespace std;
int main
ifstream inputFile;
ofstream outputFile;
inputFile.openFahrenheitTemperaturetxt;
if inputFile.isopen
cout "Unable to open the input file." endl;
return ;
outputFile.openCelciusTemperaturetxt;
Open the output file
ofstream outputFileCelsiusTemperaturetxt;
if outputFile.isopen
cout "Unable to open the output file." endl;
inputFile.close;
return ;
Read the data from the input file
string city;
double temp;
while inputFile city temp
double celsius temp ;
outputFile city celsius deg C endl;
Close the files
inputFile.close;
outputFile.close;
cout "Temperature conversion complete. Output file created." endl;
return ;
Is the code correct because I keep getting "Unable to open the input file" even though I put it in the same directory where the solution is
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
