How to create makeshift struct inheritance

Hi,
So I’m working on an inventory system and I’m trying to organize the data so it is easy to access and lowers memory usage. Right now, I have a struct that contains all the information that every “item” that can be added to the inventory (an array of that struct). But let’s say the items that can be carried can be potions, weapons, armor, and ammo. Right now, for example, I want to check the inventory for ammo and if that ammo type matches up with the type of ammo the gun uses. But I’m not sure where or how I would store that information. I have the gun type stored on the gun itself which is easy enough. But I don’t want to put the type of ammo in the item struct because it only pertains to ammo items and it’s just a waste of data I’d imagine. I have a class reference in the item in case I want to spawn an actor of a particular class and maybe access its information and have it out in the world. However, there isn’t really a need to do this for ammo I’d think. So any ideas on how or where to store the type of ammo that the item is when it is an ammo item would be really helpful! Let me know if I need to clear up anything or if any screenshots would help!