enesoncu's blog

By enesoncu, 11 years ago, In English

How can I find least one bit in bitset? I can't use A&-A where A is bitset.

  • Vote: I like it
  • +10
  • Vote: I do not like it

»
11 years ago, hide # |
Rev. 2  
Vote: I like it +49 Vote: I do not like it

For C++

bitset<200> b;
b[33] = true;
cout << b._Find_first() << endl;
  • »
    »
    11 years ago, hide # ^ |
     
    Vote: I like it +8 Vote: I do not like it

    Thank you very much. How can I reach info about this kind a functions? I searched web but I couldn't find information.

  • »
    »
    11 years ago, hide # ^ |
     
    Vote: I like it +16 Vote: I do not like it

    I'd say it's for g++, not for c++.

    (It's not standard c++ and is not supported in MSVC (cf version))