I try to print out each element in the struct array, but the format is not what I expect. I would like to print them out like the picture attached, so what am I supposed to use to print out the same format as shown in the picture.
struct Inventory {
string description; //Description of the part kept in the bin
int total; //Number of parts in the bin
};
struct Inventory bins[30];
void DisplayInventory(int & count){
for (int i = 0; i < count; i++)
{
cout << bins[i].description << setw(18) << bins[i].total << endl;
}
cout << endl;
}