C++中关于重载operator的用法

2025-02-25 02:38:40
推荐回答(1个)
回答1:

NBC_KEY a, b;
a.id_= 1;
a.lvl_=1;
b.id_= 2;
b.lvl_=2;
if(a == b)cout<<"相等"<