set容器判断是否插入成功

 set<int> sa;
    bool flag = sa.insert(1).second;
    bool flag2 = sa.insert(1).second;
    cout<<"flag="<<flag<<endl;
    cout<<"flag2="<<flag2<<endl;
posted @ 2022-07-25 15:55  我不是萧海哇~~~  阅读(46)  评论(0)    收藏  举报