The name of the class this structure is present in is
ABaseInventoryItem
There is a compilation error
1>c:\users\srikant\documents\unreal projects\survivalgame\source\survivalgame\Inventory/Items/BaseInventoryItem.h(46): error C2027: use of undefined type 'ABaseInventoryItem'
A class must be declared before you can use pointers (or references) to it.
Can you move your structure after the class?
Otherwise, you’d usually use forward declarations of the class
**Forward Declaration**
You could even forward declare your class name if you needed it in the function definition
.h
```
const bool SetStackAmount(class ABaseInventoryItem* Item);
```
and then define the rest in the .cpp of your ABaseInventoryItem.cpp
Why / How?
C++ just needs the .h declarations to all make sense, you can define stuff anywhere you want, including in separate .cpp files, as long as you include the relevant .h files.
Using forward declaration + defining UStruct functions in a .cpp you can more than do what you want.