I have problem aligning text:
Student Name Test Score Grade
Donald, Duckey 85 B
Goofy, Goof 89 B
Balto, Brave 93 A
Smitn, Snow 93 A
Wonderful, Alice 89 B
I am using the <iomanip> header for the "setw" and align "left" functions but I only manged to achieve something like this:
Student Name Test Score Grade
Donald ,Duckey 85 B
Goofy ,Goof 89 B
Balto ,Brave 93 A
Smitn ,Snow 93 A
Wonderful,Alice 89 B
Here is my code:
outFile << left << setw(9)
<< student[i].studentLName << ","
<< left << setw(10) << student[i].studentFName
<< right << setw(10) << student[i].testScore << setw(9)
<< student[i].grade << endl;
Does anyone have an idea on how to fix it? Or maybe different approach?