I made this Data Table.

The problem is when the outputs are different it will change the shape of the Table.

I need some tips on how can i fix this problem.

Thanks in Advance.

Code:
for ( int j = 0 ; j < 5 ; j++ )
		sum += myClass[j].getTotalToPay();

	cout << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" << endl;
	cout << " x First |    ID    |  Pay-Rate  |  Worked-Hours  |  Over-Time  |  TotalPay  x" << endl;
	cout << " x Name  |  Number  |            |   ( Hours )    |   (Hours)   |   ( $ )    x" << endl;
	cout << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" << endl;
	

	for ( int i = 0 ; i < 5 ; i++ )
	{
		cout << "   " << myClass[i].getName() 
			 << setw(9)  << myClass[i].getNumber()   
			 << setw(11) << myClass[i].getRate()     
			 << setw(14) << myClass[i].getWorked()   
			 << setw(17) << myClass[i].getOverTime() 
			 << setw(14) << "$" << myClass[i].getTotalToPay() << endl;
	}
	cout << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" << endl;
	cout << "                                                         Totals x  $" << sum << endl;
	cout << "                                                                xxxxxxxxxxxxxx" << "\n\n\n";

Last edited by DaWei; 21Oct2007 at 06:47..