C++ Hash Deprecation Warning

前端 未结 3 1063
梦如初夏
梦如初夏 2021-01-14 07:08

I am very new to C++ and programming in general and am currently working through Bjarne Stroustrup\'s Programming: Principles and Practices using C++. I\'m consistently rece

3条回答
  •  不要未来只要你来
    2021-01-14 07:35

    You can put the define prior to your including of the header generating the warning:

    #define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
    #include 
    

    You can also add the symbol in Proprocessor Definitions of the project file.

    enter image description here

    The later looks prettier, but given your doing something against the suggestion of the tool makers, I'd go with the first method, so you don't forget that you might get burnt latter.

提交回复
热议问题