나는 코드의이 비트를 들어 다음과 같은 컴파일러 오류오류 : 호출 (표준 : : 문자열 &)
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