Javatpoint Logo
Javatpoint Logo

C++ bitset to_ullong() Function

C++ bitset to_ullong() is used to convert the contents of the bitset to an unsigned long long integer. It returns an unsigned long long with the integer value that has the same bits set as the bitset.

Syntax

Parameter

It does not take any parameter.

Return value

It returns an Integer value with the same bit representation as the bitset object.

Example 1

Output:

1111 as an integer is : 15

Example 2

Output:

111111 as an integer is : 63
Next TopicC++ bitset



Help Others, Please Share

facebook twitter pinterest