Hi, I have one simple(?) question about conflicts in including files. I use C++ Builder but actually I use it as C cause I know it better :D
So, the cause of the problem is...
--- map.h ---
--- organism.h ---Code:#include "organism.h"
struct Map {
std::vector<Organism> guy_v;
Map();
~Map();
};
So...organism.h is included first to define type Organism and then type Map is defined. So, Map needs to be defined/declared before Organism and Organism needs to be defined/declared before Map.Code:struct Organism {
std::vector<Map>::iterator mapi;
};
What is the trivial way to include files without files depending on each others like that? :confused: Thx
Maybe I could find some way alone but I think it would have problems that I didn't think of...oh and I know about externs ;)