if (myset.count(x)) { // x is in the set, count is 1 } else { // count zero, i.e. x not in the ... В C++20 мы, наконец, получим метод std::set::contains .
確定! 回上一頁