something weird with setw() URGENT

See the following:

1
2
3
4
5
6
7
cout << setw(10) << this->studentID << "   "
           << setw(12) << this->studentName << "   "
	   << setw(10) << this->studentMajor.getName() << "   "
	   << setw(12) << this->studentCredits << " / " << this->studentMajor.getCredits() << "   "
	   << setw(3)	 << setprecision(2) << this->studentGPA	<< "   "
           << setw(13) << this->studentLevel << "   "
	   << endl;


i am asking about this part:
<< setw(12) << this->studentCredits << " / " << this->studentMajor.getCredits() << " "

if i exlpain in pictures it will be better:
i want this http://i43.tinypic.com/ibm534.jpg
but i am getting this http://i43.tinypic.com/n979j.jpg

any help? i know it might sound stupid but i am confused :S
closed account (zb0S216C)
Looks like you're pushing the output too far to the right with std::setw(). Try reducing the amount of spacing.

Wazzak
i am sure thats not it
any help?
fixed, i added setw() for " / " and for the credits
thanks anyway
Topic archived. No new replies allowed.