count
语法:
1 |
size_type count(); |
1 2 3 |
/// Returns the number of bits which are set.? 源代码 size_t count() const { return this->_M_do_count(); } |
count()函数bitset中被设置成1的位的个数。
代码:
运行结果:
10000010 bs中1的个数:2
10000111 bs1中1的个数:4
请按任意键继续. . .
《Bitset类count函数运用》上有1条评论
评论已关闭。