{"id":38,"date":"2008-01-25T22:49:33","date_gmt":"2008-01-26T02:49:33","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=38"},"modified":"2008-01-25T22:50:11","modified_gmt":"2008-01-26T02:50:11","slug":"c-struct","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=38","title":{"rendered":"C++ Struct"},"content":{"rendered":"<p>Struct<\/p>\n<ul>\n<li>Declare<code lang=\"cshpar\"><br \/>\nstruct BOOK<br \/>\n{<br \/>\nchar Title[80];<br \/>\nchar Author[80];<br \/>\nchar Publisher[80];<br \/>\nint Year;<br \/>\n};<\/code><\/li>\n<li>Initialize<code lang=\"cshpar\"><br \/>\nBOOK Novel =<br \/>\n{<br \/>\n\"Paneless Programming\",<br \/>\n\"I.C. Fingers\",<br \/>\n\"Gutter Press\",<br \/>\n1981<br \/>\n};<\/code><\/li>\n<li>Access<br \/>\n<code lang=\"cshpar\">cout &lt;&lt; Novel.Title;<br \/>\nNove.Year = 1988;<br \/>\n\/\/ Via pointer<br \/>\nRECT aRect = { 0,0,100,100};<br \/>\nRECT* pRect = &amp;aRect;<br \/>\n(*pRect).Top += 10;<br \/>\n\/\/ Equivalent<br \/>\npRect-&gt;Top += 10;<br \/>\n<\/code><\/li>\n<li>window.h\n<ul>\n<li>Defines struct RECT{int left; int top; int right; int bottom};<\/li>\n<li>Helper functions for RECT\n<ul>\n<li>InflateRect()<\/li>\n<li>EqualRect()<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>MFC\n<ul>\n<li>Defines a class called CRect<\/li>\n<li>Extensive functions to manipulate rectangular<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Struct Declare struct BOOK { char Title[80]; char Author[80]; char Publisher[80]; int Year; }; Initialize BOOK Novel = { &#8220;Paneless Programming&#8221;, &#8220;I.C. Fingers&#8221;, &#8220;Gutter Press&#8221;, 1981 }; Access cout &lt;&lt; Novel.Title; Nove.Year = 1988; \/\/ Via pointer RECT aRect = &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=38\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"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":[11],"tags":[],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-cpp"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-C","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=38"}],"version-history":[{"count":0,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/38\/revisions"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}