CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: [RESOLVED] std::map with VS 2015

  1. #1
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,595

    [RESOLVED] std::map with VS 2015

    This morning I needed to open an old project in VS2015 but I couldn't seem to make anything work. So I created an empty project with just 1 x source file and added just 1 x line:-

    Code:
    #include <map>
    But the compiler gives me this message:-

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ammintrin.h(127): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    If I remove the #include and just compile a totally empty source file, I get no errors. Any idea what I might be doing wrong..?

    [Edit...] It's looking like it might be a namespace issue because #include <string> gives me the same error - whereas #include <cstring> is fine
    Last edited by John E; March 9th, 2020 at 06:46 AM.
    "A problem well stated is a problem half solved. - Charles F. Kettering

  2. #2
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,188

    Re: std::map with VS 2015

    ammintrin.h contains the definitions for AMD specific intrinsic functions. What project settings are you using? Why is ammintrin.h being referenced? Can't check it here as I'm using Intel CPU and not AMD.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.6.5)

  3. #3
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,595

    Re: std::map with VS 2015

    Looks like an installation issue. I hadn't used VS2015 for a while so when I launched it, it went through a marathon task of upgrading itself. But I managed to restore an earlier version from a backup and launched it again (this time, making sure it I wasn't connected to the internet). And the code seems to build fine in my older version.
    "A problem well stated is a problem half solved. - Charles F. Kettering

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,315

    Re: [RESOLVED] std::map with VS 2015

    I find maintaining old versions of Visual Studio are easier by keeping them in separated VMs.

  5. #5
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,595

    Re: [RESOLVED] std::map with VS 2015

    I'd never really liked VS2015 so I bit the bullet and replaced it with VS2019. Over on a different machine, the top-right window (when I load a VS2019 project) allows me to select between 3 x tabs:- Solution Explorer, Team Explorer and Property Manager. But in the new installation I only see Solution Explorer and Team Explorer. How do I configure it to show the Property Manager tab as well

    [Edit...] Found it! It's in View->Other windows
    Last edited by John E; March 11th, 2020 at 10:11 AM.
    "A problem well stated is a problem half solved. - Charles F. Kettering

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)