{"id":707,"date":"2012-01-16T18:27:08","date_gmt":"2012-01-16T18:27:08","guid":{"rendered":"http:\/\/41j.com\/blog\/?p=707"},"modified":"2012-01-16T18:27:32","modified_gmt":"2012-01-16T18:27:32","slug":"gcc-detect-32-or-64-bit-system","status":"publish","type":"post","link":"https:\/\/41j.com\/blog\/2012\/01\/gcc-detect-32-or-64-bit-system\/","title":{"rendered":"GCC detect 32 or 64 bit system"},"content":{"rendered":"<p>For example:<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n#include &lt;iostream&gt;\r\n\r\n#if __x86_64__\r\n#define ENV64BIT\r\n#else\r\n#define ENV32BIT\r\n#endif\r\n\r\nusing namespace std;\r\n\r\nint main() {\r\n\r\n  #ifdef ENV64BIT\r\n  cout &lt;&lt; &quot;64 bit&quot; &lt;&lt; endl;\r\n  #endif\r\n\r\n  #ifdef ENV32BIT\r\n  cout &lt;&lt; &quot;32 bit&quot; &lt;&lt; endl;\r\n  #endif\r\n}\r\n <\/pre>\n","protected":false},"excerpt":{"rendered":"<p>For example: #include &lt;iostream&gt; #if __x86_64__ #define ENV64BIT #else #define ENV32BIT #endif using namespace std; int main() { #ifdef ENV64BIT cout &lt;&lt; &quot;64 bit&quot; &lt;&lt; endl; #endif #ifdef ENV32BIT cout &lt;&lt; &quot;32 bit&quot; &lt;&lt; endl; #endif }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-707","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1RRoU-bp","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/comments?post=707"}],"version-history":[{"count":3,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/707\/revisions"}],"predecessor-version":[{"id":710,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/707\/revisions\/710"}],"wp:attachment":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/media?parent=707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/categories?post=707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/tags?post=707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}