i nees to make a function to output students name in the form last name followed by a comma followed by a space followed by the first name and the name must be left justified than next to it need to print the student score and student grade like this:
Duckey, Dnoald 85 B
Goof, Goofy 89 B
i am able to do the name part but i am having problems alligning the test score and grade :
Duckey, Dnoald 85 B
Goof, Goofy 89 B
my code looks like this :
void printResult(studentType Student)
{
int vectorSize = Student.testScore.size();
cout << left << setw(10) << "Student Nmae " << right << setw(12) << "Test Score" << right << setw(12)
<< "Grades" << endl;
for (int i = 0; i < vectorSize; i++)
cout << Student.studentLName[i] << ", "
<< Student.studentFName[i]
<< right << setw(30)<< Student.testScore[i] << " "
<< right << setw(30) << Student.grade[i] << endl;
}