In function âstd::string infixToPostfix(const std::string&)â:
error: âprecedenceâ was not declared in this scope
HERE IS THE CODE
class ConvInfPost
{
public:
ConvInfPost() //Constructor
{
}
int precedence(char op);
string infixToPostfix(const string& infixExp);
double evaluatePostfix(const string& postfixExp);
// int Result;
};
HERE THE LINE OF ERROR?HOW YOU CAN SEE IS DECLARED IN THE CLASS
while (!aStack.isEmpty() &&
top != '(' && precedence(ch) <= precedence(top))
{
postfixExp += top;
aStack.pop(top);
if (!aStack.isEmpty())
aStack.peek(top);
}// end while
I can see that you're calling the function. I don't see the definition.
If the definition is in a different file, you'll need to add it to the compilation process so that the linker can link them.