结构体内重载小于号< 及构造函数

  1. struct Node {  
  2.     int d, e;  
  3.     bool operator < (const Node x) const {  
  4.         return x.d < d;  
  5.     }  
  6.     Node(int d, int e):d(d), e(e){}  
  7. }; 
原文地址:https://www.cnblogs.com/superxuezhazha/p/5492017.html