It's not a pointer problem, just output problem. Try adding fixed to cout
outFile << "Value: " << fixed << company[i].budget_value << endl;
Ancient Dragon
Achieved Level 70
32,139 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,576
Skill Endorsements: 69
lines 35 and 48: don't use while statements, just simple if will do because all its doing is testing if the file is open, and if not exiting the progrm. while is unnecessary.
line 50: while not necessary here either. If the file was opened correctly then everything within that while statement will get skipped because inFile will not be NULL and your program isn't reading anything from the file.
The code you posted osn't reading the input file at all, just getting data from the keyboard.
Ancient Dragon
Achieved Level 70
32,139 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,576
Skill Endorsements: 69
Question Answered as of 7 Months Ago by
Ancient Dragon