Hmm, mostly I'm surprised that this code compiles in the first place. You're calling your player.getWeapon and player.getArmor without passing it an unsigned int, which is the parameter in the function declaration. Also you're attempting to create arrays using a non-constant value, which should be giving you an error.
Aside from those issues one of the main causes of "freezing" can be that your code has hit an infinite loop (any loop that has an exit condition that never occurs).
An example of an infinite loop:
int a = 0;
while(a<10) a = 4;
or:
for(int i=0; i<10; i);
Neither of these will be flagged as errors by the compiler but will cause the program to halt and "freeze".
I'm a bit confused by your question about having the Sell function detail an item. I think your asking how to iterate through an array and print out useful info about each Item object. If so the best approach depends on how your array is set up. Assuming you change your array declaration to have a constant value you can simply use that value to iterate through your array:
I.E. -> for(int i=0; i<TOTAL_ITEMS; i++)
Then simply do your print code for each item (i.e. cout << "bla: " << item
.getBla;
Now if your simply partially filling your array such that currentItems<=TOTAL_ITEMS then you could instead keep currentItems updated with the filled length of the array and then do:
for(int i=0; i<currentItems; i++) and simply traverse from start to the end of the used array. This does require more array management as you'll need to add items to the end of the array (or shift items over to make a space for an item inserted into the middle) as well as shifting items back when you delete an item from the middle.
If you don't want to do all that management you can learn to use vectors, which will handle all of that for you, or you can use a less efficient but simpler method:
Simply create an array to hold what you think will be the max amount of items then in your item class declare a boolean variable that marks if the current object is being used or not. Then when you traverse the array from 0 to max you simply do operations on items that have a true boolean value.
Hopefully this information will help you some. It would be best if you could respond with more information about what you're trying to do in specific.