c++ - 'Population' has not been declared
黄舟
黄舟 2017-04-17 15:02:24
0
2
579

我有两个类Population和Group,因为要写一个Group的成员函数

void initialize(Population<T> &p, const int id);

但我已经加载了Population的头文件,IDE却提示我Population' has not been declared,请问这是什么情况??

这是Population的内容和位置

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
刘奇

includeThe 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.

刘奇

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. .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!