Instead of using the PrintName function, you want to return a string object to use with std::cout. In order to correctly align the columns you may want to look on the <iomanip>
header and especially the std::setw(n) manipulator.
Here is an example, take note that while I set the column widths to 16 characters, what you should do is calculate the maximum number of characters for each category and change the widths accordingly. What is nice about this is that you can specify a different width for each column.
string ReturnName(int ID)
{
switch (ID)
{
case 0: return "computer(s)";
break;
case 1: return "pencil(s)";
break;
case 2: return "pen(s)";
break;
case 3: return "book(s)";
break;
case 4: return "beer(s)";
break;
case 5: return "ruler(s)";
break;
case 6: return "stereo(s)";
break;
case 7: return "refrigerator(s)";
break;
case 8: return "desk(s)";
break;
case 9: return "backpack(s)";
break;
}
}
void PrintSummary(InvIDList invIDs, ItemQuantity itemQuant, int totalWeight, int totalPurch, int budget)
{
cout << left << setw(16) << "ID";
cout << left << setw(16) << "NAME";
cout << left << setw(16) << "QUANTITY" << endl;
cout << "--------------------------------------" << endl;
for(int i = 0; i < 10; i++){
cout << left << setw(16) << invIDs[i];
cout << left << setw(16) << ReturnName(i);
cout << left << setw(16) << itemQuant[i] << endl;
}
cout << "\n\nTotal Amount Spent: $" << totalPurch <<endl;
cout << "Amount of Budget Remaining: $" << budget <<endl;
cout << "Total Weight of Items Purchased: " << totalWeight <<endl;
}