Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

the number of ones int bitset

bitset<10> s(string("0010011010"));
cout << s.count() << "
"; // 4
 
PREVIOUS NEXT
Tagged: #number #int #bitset
ADD COMMENT
Topic
Name
1+5 =