{"id":475,"date":"2010-11-05T08:35:57","date_gmt":"2010-11-05T13:35:57","guid":{"rendered":"http:\/\/www.jaimerios.com\/?p=475"},"modified":"2010-11-05T08:35:57","modified_gmt":"2010-11-05T13:35:57","slug":"preventing-visual-studio-from-defining-min-and-max","status":"publish","type":"post","link":"https:\/\/jaimerios.com\/?p=475","title":{"rendered":"Preventing Visual Studio from defining min and max"},"content":{"rendered":"<p>To prevent Visual Studio from defining it&#8217;s own min and max functions, include the following in the top of your implementation file:<\/p>\n<pre lang=\"c\">#ifdef _WIN32\n    #ifndef NOMINMAX\n        #define NOMINMAX\n    #endif\n#endif<\/pre>\n<p>You can also define NOMINMAX in the Preprocessor Definitions option in the Common Properties-&gt;C\/C++-&gt;Proprocessor property page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To prevent Visual Studio from defining it&#8217;s own min and max functions, include the following in the top of your implementation file: #ifdef _WIN32 #ifndef NOMINMAX #define NOMINMAX #endif #endif You can also define NOMINMAX in the Preprocessor Definitions option in the Common Properties-&gt;C\/C++-&gt;Proprocessor property page.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[302,480],"class_list":["post-475","post","type-post","status-publish","format-standard","hentry","category-coding","tag-min-max-macros","tag-visual-studio"],"_links":{"self":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=475"}],"version-history":[{"count":0,"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/475\/revisions"}],"wp:attachment":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}