This is a struct. The kind of struct is an "edge".
It has three member variables. They are integers. They are named p, q and cost.
It has one member function. A constructor. To create an object of type edge, you will have to use that constructor. The constructor provides default values, so if you don't provide any variables when you construct one, some default values will be used.
It has one overloaded operator. The operator "<". This operator is used to compare two variables of type "edge". It is used to see if the "cost" member variable of one edge is less than that of another edge.
You are reminded that in C++ the difference between a struct and a class is the default level of member visibility. In C++, a struct has member functions. It has constructors. It is just like a class.
Yeah...I'm true
thanks but I have another problems with operator overloading...
1.The "<" operator needs 2 int as input to operate but here we have just one input...
const edge &two
2.what is the alone const word at the end of the line that operator overloaded? what act does it?