Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ofstream outFile: how to organize?

Status
Not open for further replies.

Ciralia

Programmer
Oct 22, 2002
51
0
0
US
All I'm trying to do is to organize the output file my program creates. It creates a text file full of different fields for baseball info. I tried aligning the outFile by doing:

outFile << setw(4);

But this line gives me an error about the '<<' not being defined. Do I have to have some kind of overload or include file to have this work?
 
Nobody knows how to use the setw in an output file?
 
Don't fully understand your problem.
How are you writing to your output file?
If you are using fprintf then you can format the length there. If you are attempting to format a text file after it's been created then is that a C++ issue?
 
What is outFile? an fstream? What did you do to declare it? to initialize it? what libraries did you include? what namespace?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top