{"id":47111,"date":"2024-04-05T16:20:42","date_gmt":"2024-04-05T16:20:42","guid":{"rendered":"https:\/\/www.oracletutoring.ca\/blog\/?p=47111"},"modified":"2024-04-30T21:35:38","modified_gmt":"2024-04-30T21:35:38","slug":"computer-science-uint32-vs-uint32_t","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/computer-science-uint32-vs-uint32_t\/","title":{"rendered":"Computer science: uint32 vs uint32_t"},"content":{"rendered":"\n<h2>Self-tutoring about computer science: the tutor mentions a key difference in types.<\/h2>\n<p>\nI was reading in some documentation about a certain function with return type uint32. It means, to my understanding, &#8220;unsigned integer 32-bit,&#8221; so I wasn&#8217;t too surprised about it.<\/p>\n<p>\nAlthough it did compile, my program was unhappy. One of the changes before the unhappiness arose had been the inclusion of the uint32 type. Yet, how could that be a problem? After all, it was from the documentation about the software library I was using(!)<\/p>\n<p>\nYet, the problem seems to have been the declaration of the uint32 type. It should be uint32_t. After I changed it to uint32_t, then recompiled, the program stopped failing.<\/p>\n<p>\nYears ago my mechanic friend mentioned that even the literature specific to a piece of equipment will sometimes mis-document what you will see under the hood. &#8220;It&#8217;s not like it says in the manual,&#8221; he would claim. I discovered the same years later in a mechanical setting.<\/p>\n<p>\nSource:<\/p>\n<p>\n<a href=\"https:\/\/cplusplus.com\/reference\/cstdint\/\">cplusplus.com<\/a><\/p>\nJack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Self-tutoring about computer science: the tutor mentions a key difference in types. I was reading in some documentation about a certain function with return type uint32. It means, to my understanding, &#8220;unsigned integer 32-bit,&#8221; so I wasn&#8217;t too surprised about &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/computer-science-uint32-vs-uint32_t\/\"> <span class=\"screen-reader-text\">Computer science: uint32 vs uint32_t<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105],"tags":[3127,3128],"class_list":["post-47111","post","type-post","status-publish","format-standard","hentry","category-computer-science","tag-c-programming","tag-uint32-vs-uint32_t"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/47111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=47111"}],"version-history":[{"count":3,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/47111\/revisions"}],"predecessor-version":[{"id":47114,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/47111\/revisions\/47114"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=47111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=47111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=47111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}