I can not figure out thos errors 11:50 PM

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

Is there more code? If there is post it.

btw Use code tags when posting code. It's much easier to see. (Hit the picture that looks like a # sign and place your code inside the tags)
Last edited on
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.
Is the bolded line of code inside one of ConvInfPost's member functions?
Topic archived. No new replies allowed.