set::count ()是C++ STL中的內置函數,它返回元素在集合中出現的次數。由於set容器僅包含唯一元素,因此隻能返回1或0。 用法: set_name.count(element).
確定! 回上一頁