To express an integer in binary, precede it with the characters 0b or "0B" - C++ Data Type

C++ examples for Data Type:int

Description

To express an integer in binary, precede it with the characters 0b or "0B"

int role = 0b11111111; 
role = 0b00001111 - 0b00001101; 

The new digit separator in C++ is the single quote character (').

Here's a statement that uses it:

long long ouch = 99'241'686'248'628;

Related Tutorials