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.
Related
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.
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.
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.
This question already has answers here:
Why does C++ not have reflection?
(15 answers)
Closed 9 years ago.
I am currently porting a game from Cocos2d written in ObjectiveC to Cocos2d-x in C++. Now the objective C guys have used Reflection to populate modal classes from a json object. Is the same possible in C++ Can we use reflection in C++ ?
Kind Regards
As mentioned in the comments, C++ has no reflection.
The default solution is to register all the symbols that you need in an associative array, like unordered_map. Here are examples of that.
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.