file i/o has no output

Hello fellow coders. I have a slight issue right now. My class is working with inputting and outputting information from files using the fstream header and such. The code that I have right now is very simple, but for some reason is not working. The text file has the following information in it:

"Giselle Robinson Accounting
5600 5 30
450 9
75 1.5"

The program is actually opening the file, and inputting the data to the outFile 'outData.out/.txt' but for some reason when I run the program it just says
"
RUN SUCCESSFUL (total time: 53ms)
"
with no further output. I can see in the outData.out/.txt (i've tried both formats) the information exists, it just refuses to send it to the console i guess.

Any help?

Thanks.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
#include <cstdlib>

using namespace std;

int main() 
{
    ifstream inFile;
    ofstream outFile;
    
    string firstName;
    string lastName;
    string department;
    double grossSalary;
    double bonus;
    double tax;
    double distanceTraveled;
    double travelTime;
    int cupSold;
    double cupCost;
    
  
    
    inFile.open("inData.txt");
    outFile.open("outData.out");
    
    //outFile << fixed << showpoint << setprecision(2);
    
    inFile >> firstName >> lastName >> department;
    outFile << "Name: " << firstName << endl;
    
    inFile.close();
    outFile.close();
    return 0;
}
Well, from a little bit of looking around, and reading a bit closer into my book I think I've answered my question. This program isn't supposed to actually output information to the console.....
Topic archived. No new replies allowed.