My objective is to write the code for the class definition of an Item class. The main() function should create an array of 5 Item objects. Then the main() must loop through the array allowing the user to enter data for each item(but not a quantity). As each item description is entered, use the setDesc() mutator to assign the entry to the description data member and use the increment() method to add 1 to the quantity.
Assume that the user will enter 5 different items
Finally, the main() function should loop through the array of items showing each description and quantity
My problem seems to be with the main() function. I don't quite understand how I can go about allowing the user to add their own items and assigning it to the array. I feel I am close though, here's what I have so far
there were various missing/misaligned braces in your program, this is a working version but you may have to shape it a bit further depending upon your final requirements: