我有两个类Population和Group,因为要写一个Group的成员函数
void initialize(Population<T> &p, const int id);
但我已经加载了Population的头文件,IDE却提示我Population' has not been declared
,请问这是什么情况??
这是Population的内容和位置
怪我咯2017-04-17 15:04:24
include
The paths all start from the current path. The picture you showed is a bit unclear. But based on the image information, I wrote it down. You can try it.
怪我咯2017-04-17 15:04:24
The problem has been solved because the Group file is already included in Population.h. So declare the Population class above the Group class and you can use it. .