Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft C #41

Open
breese opened this issue Nov 25, 2024 · 2 comments
Open

Microsoft C #41

breese opened this issue Nov 25, 2024 · 2 comments

Comments

@breese
Copy link
Contributor

breese commented Nov 25, 2024

I received the following

Hello,

in your Pre-defined Compiler Macros List is "Microsoft C" missing.
Microsoft C does have the Macro _MSC_VER since version 6.0 and the value is 600.

I don't have a github account that's why i'm sharing this via sourceforge.

Best Regards,
Oliver

@a1batross
Copy link
Member

Microsoft C is a predecessor to Microsoft Visual C++, I guess?

That might explain why compiler in Visual C++ 6.0 package have _MSC_VER defined at 1200.

@yuvashrikarunakaran
Copy link

#include

int main() {

#if defined(_MSC_VER)
#if _MSC_VER == 1200
std::cout << "You are using Visual C++ 6.0 (_MSC_VER = 1200)" << std::endl;

#elif _MSC_VER >= 1900
    std::cout << "You are using Visual Studio 2015 or newer (_MSC_VER >= 1900)" << std::endl;
    
#else
    std::cout << "You are using an older or unsupported version of Visual C++ (_MSC_VER = " 
              << _MSC_VER << ")" << std::endl;
#endif

#else
std::cout << "This code is not being compiled with a Microsoft compiler." << std::endl;
#endif

return 0;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants