小编Tra*_*yen的帖子

错误:找不到匹配的重载函数

int main()
{
    string str;
    cout << "Enter Infix Expression \n";
    cin >> str;
    cout << "infix:" << str << "\n";
    string postfix = InfixToPostfix(str); // **error cause here**
    cout << "postfix:  " << postfix << "\n\n";

    system("pause");
    return 0;
}

// Function to evaluate Postfix expression and return output
template <class T>
string InfixToPostfix(string& str)
{
    Stack<char> *charStackPtr;
    charStackPtr = new Stack<char>();

    string postfix = ""; // Initialize postfix as empty string.
    for (int i = 0; i< str.length(); …
Run Code Online (Sandbox Code Playgroud)

c++ error-handling templates class

1
推荐指数
1
解决办法
4588
查看次数

标签 统计

c++ ×1

class ×1

error-handling ×1

templates ×1