次のコンパイラ エラーが発生します
エラー: '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);
私が間違っていることはありますか?ありがとう!