I'm obviously making a mistake here, but please help me.
#include <iostream> #include <string> using namespace std; int main() { class Item { int Value; int Use_On(Entity Target) { Target.HP += Value; } }; class Entity { int HP; Item Slot; }; } The Item class have a function that change the HP value of an Entity object, and the Entity class have an Item object. This result in an error because Entity wasn't declared yet. I've tried to make a prototype of the Entity class and declare it before the Item class, but this just result in another error saying Entity is an incomplete type. How can I solve this? Also, sorry for the title, I'm not really good at english :|