I've been using the setw() function to tidy up my output, but it appears that different lengths within the first value output effect the position of the later ones.
How do you set the output to it alligns whatever the length.
ThanksCode:void print_bill ( BillLine bill_line[50], int num_bill_items ) { cls(); cout << "THE CORNER SHOP\n\n"; cout << "Product " << setw(20) << "Kilos" << setw(20) << "Cost(£)" << endl; for (int i=0; i<num_bill_items; ++i) { cout << bill_line[i].stock.desc << setw(20) << bill_line[i].weight << setw(20) << bill_line[i].cost << endl; } cls(); }