Dandruff
Member
|
[SOLVED] Merging 02 - Inventory with my project
I decided to merge the inventory tutorial into my project but i am stumped upon this one problem.
Code:
1>c:\users\dandruff\desktop\esenthelenginesdk\project\mainsource\Game/Game_Inventory.h(16) : error C2143: syntax error : missing ';' before '*'
1>c:\users\dandruff\desktop\esenthelenginesdk\project\mainsource\Game/Game_Inventory.h(16) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dandruff\desktop\esenthelenginesdk\project\mainsource\Game/Game_Inventory.h(16) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dandruff\desktop\esenthelenginesdk\project\mainsource\Game/Game_Inventory.h(40) : error C2065: 'inv_gui' : undeclared identifier
It doesn't recognize InventoryGui even though they're both included in the same header (main.h)
Code:
InventoryGui *inv_gui ; // pointer to InventoryGui linked with Inventory
The 2 headers Inventory and InventoryGUI (in my case i named them Game_Inventory and Game_InventoryGUI) both need to be defined at once for them to "see" each other, and they don't right now. I looked at the original project and compared it to my own but i can't put a finger on it.
I made sure that all headers are included in main.h.. and.. i don't know what else to look for that could be of use here. :(
Any help is appreciated, thank you.
(This post was last modified: 11-11-2010 06:36 PM by Dandruff.)
|
|
11-10-2010 05:48 AM |
|
Esenthel
Administrator
|
RE: Merging 02 - Inventory with my project
sometimes you need to do a forward declaration:
struct InventoryGui;
check top of the main.h from tutorials, or _structs.h
|
|
11-10-2010 12:00 PM |
|