When I print the results of my program to the screen, the data is all over the place but I want to align the results as best as possible. I am using setw(10) in order to do this but it's not working properly can someone help me?
Thanks
This is what the output looks like:
This is my print function:
void Print(const call_record *call_DB, int & count)
{
cout << fixed << showpoint << setprecision(2);
for(int i= 0; i <= count; i++)
{
cout << call_DB[i].firstname <<" " << call_DB[i].lastname <<" " << call_DB[i].cell_number <<setw(15) << call_DB[i].relays <<setw(10) << call_DB[i].call_length;
cout <<setw(10) << call_DB[i].net_cost <<setw(10) << call_DB[i].call_rate << setw(10) << call_DB[i].call_tax <<setw(10) << call_DB[i].total_cost;
cout << endl;
}
}