Basic Design Question

Hey, I'm working on another personal project. This time, I'm trying to use more object oriented design.

My question has to do with the placement of a certain structure. For example, in my project I have a Player class and a Creature class. I'm thinking about turning those two classes into derived classes of an 'Entity' base class. I would like to have a simple structure used in both of these classes. In what file should I define this structure?

1
2
3
4
struct Attributes
{
	int Str, Dex, Con, Int, Wis;
};
Last edited on
Define all classes, structure in one header file or base class header file.

Thanks,
Harini
Thanks for the reply but I don't quite understand. Could you please elaborate?
I generally stick to a class per header file.
So far, I have Entity.h, Player.h, and NPC.h

Player and NPC classes are derived from Entity.

Would I place my Attributes structure in a file 'Attributes.h'?
That's possible. The first idea that comes to mind for me is to declare it inline the Entity class, and then use Entity::Attributes if you want to get the type.
Thanks for the help =D
Topic archived. No new replies allowed.