我在 County.h 类的构造函数中:
struct Country {
Country(double**, int);
};
在主函数中,我有一个graph[Size][Size]
数组,并且我想调用County
的构造函数。
int main() {
double graph[Size][Size];
Country c(graph, 0);
}
但是它给我错误提示:no matching function for call to ‘County::County(double [22][22], int)’
为了解决这个问题,我可以做什么?
double
重新解释为指针不会带来任何有用的结果。 - Quentin