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

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

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

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

这是Population的内容和位置

黄舟
黄舟

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

Antworte allen(2)
刘奇

include路径都是从当前路径开始的. 你显示的图. 有些不太懂. 但是根据图像信息. 我写了一下, 你试一下吧.

刘奇

问题已经解决了,因为Population.h中已经包含了Group文件。所以在Group类的上面声明一下Population类就可以使用了。。

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!