[英]statement cannot resolve address of overloaded function
I encountered that eror in the following function. 我在以下功能中遇到了这个错误。 Does anyone have an idea what it means?
有人知道这意味着什么吗?
template <class T>
void printAll(Array <T> &A){
for(int i=0; i<31; i++){
A.M[i].printObj; ///// ERROR
std::cout<<std::endl;
}
}
The function should print all my objects. 该功能应打印我的所有对象。
.printObj
works because I tested it in the class print function. .printObj
起作用是因为我在类打印功能中对其进行了测试。 Thank you, and for any more details I may have forgotten please ask. 谢谢,对于我可能忘记的更多详细信息,请询问。
The parameters to the call are missing. 调用的参数丢失。 Probably, you meant something like
可能你的意思是
A.M[i].printObj();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.