I'm getting the following compiler error
error: no matching function for call to 'infxTree(std::string&)'
For this bit of code.
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;
}
I get the error on all the last 3 lines. Here's the function:
template <typename T>
tnode<T> infxTree(const string& iexp);
Any ideas what I'm doing wrong? Thanks!