I have a struct(A) and Priority Queue(PQ) at another struct(B).
This is struct A below :
struct Node{
int level;
int total;
std::vector<int> sequence;
void clear(){
sequence.clear();
}
void init(){
level = 0;
total = 0;
sequence.clear();
}
long subjectNumber(){
return sequence.size();
}
bool isInSequence(int index){
for(int i = 0; i < sequence.size(); i++){
if(index == sequence.at(i)){
return true;
}
}
return false;
}};
Nothing special right?
and I use priority queue of Node Objects like below :
std::priority_queue<Node> pq;
But when I run the project I got an error :
Invalid operands to binary expression ('const Node' and 'const Node')
I want to put top priority for the total value of Node object How can I solve this problem?
UPDATED:
The picture is what I'm getting, at the project, there is no 'red'Line for me!
