Results 1 to 3 of 3

Thread: determine VS compiler version in C++

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    394

    determine VS compiler version in C++

    I hope that someone can help me with this C++ problem.

    I work in an environment where our clients use various versions of VS so our code has to vary based on the VS version being used. I'm editing some code that has something like this:
    Code:
    #ifdef Win32
    #if ( _MSC_VER < 1300 )
    #define STDCALL __stdcall
    #else
    #define STDCALL
    #endif
    #endif
    My question is how do i detemine the MSC version? What does the 1300 represent? As a tutorial, I would like to use a form/message box that will display the version number. Any help would be appreciated greatly.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    394

    Re: determine VS compiler version in C++

    I tried to put this in a click event but I keep getting errors.
    Code:
    this->label1->Text = _MSC_VER.ToString;
    error C2475: 'System::Int32::ToString' : forming a pointer-to-member requires explicit use of the address-of operator ('&') and a qualified name

    I know how to do this in VB but am completely new to C#/C++.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: determine VS compiler version in C++

    C++ and C# are quite different languages. This is a C# forum. This is a C++ forum.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width