Below is the code snippet which is incorrect.

I want to implement dijkstra using priority queue stl of c++. But i cant figure out the right syntax for using this priority\_queue with edge class. I want to put edge to priority\_queue with based on weights. 

```
class edge{
public: 
    int src;
    int dest;
    int wt;
};

class comp {
bool operator() (int a, int b) {
    if(a<=b){
        return true;
    }else{
        return false;
    }
   }
};

priority_queue<int,edge,comp> check;

edge e1,e2,e3;
e1.dest=1;
e2.dest=2;
e3.dest=3;

```