{"id":301,"date":"2010-06-17T09:43:49","date_gmt":"2010-06-17T14:43:49","guid":{"rendered":"http:\/\/www.jaimerios.com\/?p=301"},"modified":"2010-06-17T09:43:49","modified_gmt":"2010-06-17T14:43:49","slug":"cleaning-up-those-crt-warnings-in-visual-studio","status":"publish","type":"post","link":"https:\/\/jaimerios.com\/?p=301","title":{"rendered":"Cleaning up those CRT warnings in Visual Studio"},"content":{"rendered":"<p>When you need to clean up the CRT warnings about unsecure functions, like printf or sprintf, in favor for secure functions like printf_s or sprintf_s, you don&#8217;t have to scour through all of your code to clean up the warnings. <\/p>\n<p>You can declare the following for Visual Studio builds and the functions are overridden with templated versions that are secure:<br \/>\n#ifdef _MSC_VER<br \/>\n\t#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1<br \/>\n#endif<\/p>\n<p>This is useful if you have a C++ cross platform file where you don&#8217;t want to create macros to have one function for the Mac and the other version for Windows.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you need to clean up the CRT warnings about unsecure functions, like printf or sprintf, in favor for secure functions like printf_s or sprintf_s, you don&#8217;t have to scour through all of your code to clean up the warnings. You can declare the following for Visual Studio builds and the functions are overridden with &#8230; <a title=\"Cleaning up those CRT warnings in Visual Studio\" class=\"read-more\" href=\"https:\/\/jaimerios.com\/?p=301\" aria-label=\"Read more about Cleaning up those CRT warnings in Visual Studio\">Read more<\/a><\/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":[37,148,367,436],"class_list":["post-301","post","type-post","status-publish","format-standard","hentry","category-coding","tag-_crt_secure_cpp_overload_standard_names","tag-crt","tag-printf","tag-templated"],"_links":{"self":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/301","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=301"}],"version-history":[{"count":0,"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/301\/revisions"}],"wp:attachment":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}