{"id":741,"date":"2010-02-17T11:44:24","date_gmt":"2010-02-17T11:44:24","guid":{"rendered":"http:\/\/www.codingfriends.com\/?p=741"},"modified":"2010-02-17T11:44:24","modified_gmt":"2010-02-17T11:44:24","slug":"typedef-what-are-they-for","status":"publish","type":"post","link":"https:\/\/www.codingfriends.com\/index.php\/2010\/02\/17\/typedef-what-are-they-for\/","title":{"rendered":"typedef &#8211; what are they for"},"content":{"rendered":"<p>The typedef is to shorten the naming of some types e.g. is you want to have short unsigned called SHORTUN for quicker typing you can use the type definition syntax of <\/p>\n<pre lang=\"cpp\">\r\ntypedef <old type> <new type>\r\n<\/pre>\n<p>so regarding the example of short unsigned to SHORTUN<\/p>\n<pre lang=\"cpp\">\r\ntypedef short unsigned SHORTUN\r\n<\/pre>\n<p>a probably better example would be if you wanted to have a apple as a type (which would be a integer value) then you could<\/p>\n<pre lang=\"cpp\">\r\ntypedef in APPLE\r\n<\/pre>\n<p>now you could use the code<\/p>\n<pre lang=\"cpp\">\r\nAPPLE apple = 1;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The typedef is to shorten the naming of some types e.g. is you want to have short unsigned called SHORTUN for quicker typing you can use the type definition syntax of typedef so regarding the example of short unsigned to SHORTUN typedef short unsigned SHORTUN a probably better example would be if you wanted to &hellip; <a href=\"https:\/\/www.codingfriends.com\/index.php\/2010\/02\/17\/typedef-what-are-they-for\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">typedef &#8211; what are they for<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[103],"class_list":["post-741","post","type-post","status-publish","format-standard","hentry","category-c_and_cpp","tag-typedef"],"_links":{"self":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/comments?post=741"}],"version-history":[{"count":1,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/741\/revisions"}],"predecessor-version":[{"id":742,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/741\/revisions\/742"}],"wp:attachment":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/media?parent=741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/categories?post=741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/tags?post=741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}