I’m working on a project that involves managing an inventory system using C++. I have the following code snippet:
my struct for inventory management
me trying display the inventory by using a AVL tree system
the menu option
This section is like a checkpoint for its section of the story
In this code, I’m implementing a binary tree-based inventory system. The InventoryNode struct represents individual items, and the Inventory struct maintains the overall inventory.
However, I’m encountering a C4133 warning related to incompatible types. The warning occurs specifically in the following lines:
131. displayInventoryItems(inventoryNode->left);
134. displayInventoryItems(inventoryNode->right);
I suspect that the issue is related to pointer dereferencing or type mismatches, but I’m not sure how to resolve it. Can someone help me understand why this warning is happening and how to fix it?
I aim to display inventory items along with their corresponding quantities and names using an AVL Tree data structure. However, I’m encountering a pointer mismatch issue when accessing the nested struct within the main inventory struct.
Felix Nathaniel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1