Visual studio c++ why don't 0b00000001 compile [duplicate] - c++

This question already has answers here:
Can I use a binary literal in C or C++?
(24 answers)
Closed 8 years ago.
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++?

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.

Related

How do I find the L2CacheSize, L3CacheSize from C++ on Windows7? [duplicate]

This question already has answers here:
C++ cache aware programming
(10 answers)
Closed 7 years ago.
I am profiling my code on various CPUs running Windows7 and my results so far suggest that I need to tune a buffer size proportional to the machine's L2CacheSize or L3CacheSize. Is there a way to obtain these parameters from C++?
You can use the GetLogicalProcessorInformation function to get that. It returns an array of SYSTEM_LOGICAL_PROCESSOR_INFORMATION structures which contain a CACHE_DESCRIPTOR structure, which provides the cache size information.

Check platform and use the correct printf form [duplicate]

This question already has answers here:
How to detect reliably Mac OS X, iOS, Linux, Windows in C preprocessor? [duplicate]
(3 answers)
Closed 8 years ago.
It's been 10 years since I've learned C++ during high school, now I'm playing around it again and I'll already facing some problems regarding multi-platform.
I saw that if I want to display special characters on windows, I should use wprintf. However, on *nix systems, it is not necessary.
So, how can I detect what is the current platform, so I can run printf or wprintf depending on it?
UPDATE
I'll open a new question with the error and close this one.
You could simply use wprintf (or wcout <<) on either platform. See this question for an example.

Getting OSName as a string C++ [duplicate]

This question already has answers here:
Get OS in c++ win32 for all versions of win?
(5 answers)
Closed 9 years ago.
Im am super new to C++ and am trying to figure out how to return the OSName (win 7, 8, vista, xp, etc) as a string. I tried searching and MSDN was no help, only confused me further.
All help appreciated.
it seems using predefined headers is the easiest way
http://sourceforge.net/p/predef/wiki/OperatingSystems/
What makes you think MSDN will give you the answers? Microsoft's implementation on MSDN is not standard C++, and thus you should be looking for a portable solution.

Arbitrary precision in c++ using Windows? [duplicate]

This question already has answers here:
Bignum libraries for windows?
(4 answers)
Closed 9 years ago.
Is there a library that can be implemented relatively easily in windows?
I made a few functions a while ago which used arrays of numbers to get the desired outcome. I might work at them when I get the time.
But is there any such feature already available that can be implemented into c++ easily?
Apparently people have had luck with using the GNU Multiple Precision Arithmetic Library for Windows.

Open MFC application to get source-code [duplicate]

This question already has answers here:
Is it possible to "decompile" a Windows .exe? Or at least view the Assembly?
(16 answers)
Closed 7 years ago.
Does someone know how to open an MFC application to get the source-code?
(I want to know how it works)
MFC is compiled from C++ source, so it can't be recovered. You can use a decompiler on it, but the source you get back won't be particularly instructive.
There's a good related question on debugging, disassembling and decompiling you can check for more links.