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.
Related
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:
How do you check the windows version in Win32 at runtime?
(2 answers)
Closed 9 years ago.
I wanted to ask, is there any possibility to determine the Windows version via the application, I have made some research, but haven't found,
Thank you in advance ^^
Err... How about GetVersionEx() ?
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.
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.
This question already has answers here:
Cross-platform crash handler
(3 answers)
Closed 9 years ago.
Are there any cross platform crash reporters for C++ besides google-break pad? I have seen google-breakpad but it has very very limited documentation, and I have nothing seen very much mentioned here, google or other source websites
Have a look at BugTrap which might help you.