我得到以下编译器错误错误:调用...(的std :: string&)
error: no matching function for call to 'infxTree(std::string&)'
对于该位的代码不匹配功能。
int main(){
string infxStr;
cout << "Enter an infix string: " << endl;
cin >> infxStr;
prefixOutput(infxTree(infxStr));
postorderOutput(infxTree(infxStr), ' ');
displayTree(infxTree(infxStr), infxStr.size());
return 0;
}
我得到的所有的最后3行错误。这里的功能:
template <typename T>
tnode<T> infxTree(const string& iexp);
任何想法我做错了什么?谢谢!
谢谢!该程序仍然不起作用,但至少现在它编译,所以我可以尝试找出原因!多谢。 – Gray