here is the code:
struct SalesItem
{
char upc;
string name;
}
SalesItem itemList[NUM_ITEMS];
get_item_name(itemList, upc);
In the function call for get_item_name I pass the value of upc which can be a char A through I. I am supposed to retrieve the matching name (each value of upc has a corresponding name) and print it. So, itemList[0].upc has value 'A' and itemList[0].name has value "corn", and itemList[1].upc is 'B' and itemList[1].name is "candy", and so on. Is this a possible operation with this type of setup? This code is what our professor gave us to start with.