代码不懂,谢谢大家帮忙看看
bool isOperator(char ch){
string operators="+-*/%";
return (operators.find_first_of(ch) != string::npos); //这行什么意思啊,operators.find_first_of()是库函数?
}
class BTNode { // a binary tree node
public:
BTNode(char ch, BTNode *leftPtr, BTNode *rightPtr);
void inOrder();//in-order traversal of the tree displaying
//the round brackets around each expression tree
private:
char item;
BTNode *leftChild;
BTNode *rightChild;
};
BTNode::BTNode(char ch, BTNode *leftPtr,BTNode *rightPtr) {
item = ch;
leftChild = leftPtr;
rightChild = rightPtr;
}
void BTNode::inOrder() {
//missing code here
//---------to be completed for B)---------
}