I have an issue with char buffer in windows7 machine.
Previously we are using char buffer like this char_256 , now we have upgraded/created the char buffer with 512 and 1024 i.e char_512 , char_1024 .
512 and 1024 are working fine in windows 10, server12,16,19 machines, it is not working/application crashing in windows7 machines, and i tried below code still not working, anyone can suggest to me how to achieve this.
#if _WIN32_WINNT == _WIN32_WINNT_WIN7
My question is like, how to find out the os version at compile time and based on that is has to take the proper char buffer at runtime (i.e if win7 it has to take char, if it is win10 or latest it has to take char, char).
Note: Need the solution in c/win32.
Source: Windows Questions C++