Error: “expected primary-expression before int”

I am getting an error: expected primary-expression before int when I try to return a 2 values in bool function, I think its a member function error.

bool binaryTreeTraversal::LeafNode(int node)
{
        return (binaryTreeTraversal::LeftPtr(int node) == NULL &&   
        binaryTreeTraversal::RightPtr(int node) == NULL);

}

class binaryTreeTraversal

{
public:
    int TreeNodes[2^5];
    int size;
    binaryTreeTraversal(void);
    bool LeafNode(int node);
    int RootNode(int node);
    int LeftPtr(int node);
    int RightPtr(int node);
    int length();
    int preOrderTraversal(int);
    int inOrderTraversal(int);
    int postOrderTraversal(int);
};

bool binaryTreeTraversal::LeafNode(int node)
{
    return (binaryTreeTraversal::LeftPtr(node) == NULL &&
            binaryTreeTraversal::RightPtr(node) == NULL);
}

Leave a Comment

tech