Answer the question
In order to leave comments, you need to log in
How to solve the error: "non-static non-member reference must be relative to the given object"?
There is this class:
class BST {
struct node {
map<string, string> data;
node* left = nullptr;
node* right = nullptr;
};
node* root;
//дальше разные методы
}
void insert(string eng, string rus) {
root = insert(eng, rus, root);
//здесь insert - приватный метод класса BST
}
friend void operator +=(string eng_word, string rus_word) {
root = insert(eng_word, rus_word, root);
}
void operator +=(string eng_word) {
root = insert(eng_word, eng_word, root);
}
Answer the question
In order to leave comments, you need to log in
friend void operator +=(string eng_word, string rus_word) {
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question