The _Find_first() is a built-in function in C++ Biteset class which returns an integer that refers the position of first set bit in bitset. If there isn’t any set bit, _Find_first() will return the size of the bitset.
iterator bitset._Find_first() or int bitset._Find_first()
Parameters: The function accepts no parameter.
Return Value: The function returns an integer which refers to the position of first set bit in bitset. If there isn’t any set bit, _Find_first() will return the size of the bitset.
Below is the illustration of the above function:
position of first set bit in bset 5 position of first set bit in bset1 32
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- _Find_next() function in C++ bitset with Examples
- bitset all() function in C++ STL
- bitset set() function in C++ STL
- std::bitset::to_ullong and std::bitset::to_ulong in C++ STL
- bitset reset() function in C++ STL
- bitset none() in C++ STL
- bitset any() in C++ STL
- bitset test() in C++ STL
- bitset size() in C++ STL
- bitset::flip() in C++ STL
- C++ bitset and its application
- bitset operator in C++ STL
- bitset count() in C++ STL
- Subset sum queries using bitset
- C++ bitset interesting facts
- Count number of set bits in a range using bitset
- Count number of common elements between two arrays by using Bitset and Bitwise operation
- ios bad() function in C++ with Examples
- ios eof() function in C++ with Examples
- conj() function in C++ with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.