Visual studio c++ why don't 0b00000001 compile

4.7k views Asked by At

I am trying to port a small program I initially made for Linux, The only thing that gives me a error now is any binary numbers written like this 0b01010101.

I can't find any information on why this does not work on windows or how I could get it to work on windows.

Is this not standard in c++?

1

There are 1 answers

1
herohuyongtao On BEST ANSWER

Currently, this will not work.

This will be a new feature of C++14. Numeric literals in C++14 can be specified in binary form. The syntax uses the prefixes 0b or 0B.