{"id":1738,"date":"2024-04-21T15:53:26","date_gmt":"2024-04-21T07:53:26","guid":{"rendered":"https:\/\/wp.minicoda.com\/?p=1738"},"modified":"2025-03-22T10:51:16","modified_gmt":"2025-03-22T02:51:16","slug":"%e4%b8%ba%e4%bb%80%e4%b9%88%e7%bc%96%e8%af%91objc%e4%bb%a3%e7%a0%81%e9%9c%80%e8%a6%81%e5%8a%a0-fconstant-string-classnsconstantstring%e9%80%89%e9%a1%b9","status":"publish","type":"post","link":"https:\/\/wp.minicoda.com\/index.php\/%e4%b8%ba%e4%bb%80%e4%b9%88%e7%bc%96%e8%af%91objc%e4%bb%a3%e7%a0%81%e9%9c%80%e8%a6%81%e5%8a%a0-fconstant-string-classnsconstantstring%e9%80%89%e9%a1%b9\/","title":{"rendered":"\u4e3a\u4ec0\u4e48\u7f16\u8bd1ObjC\u4ee3\u7801\u9700\u8981\u52a0-fconstant-string-class=NSConstantString\u9009\u9879?"},"content":{"rendered":"\n<p>\u5982\u679c\u4f7f\u7528GNUStep\u7f16\u8bd1ObjC\uff0c\u4e00\u4e2a\u7ecf\u5e38\u9047\u5230\u7684\u9009\u9879\u662f-fconstant-string-class. \u5b83\u7684\u4f5c\u7528\u662f\u6307\u5b9a\u5e38\u91cf\u5b57\u7b26\u4e32\u6240\u4f7f\u7528\u7684class\u7c7b\u578b\u3002\u4e3a\u4ec0\u4e48\u5e38\u91cf\u5b57\u7b26\u4e32\u8981\u6307\u5b9a\u7c7b?\u6b63\u5e38GCC\u89e3\u6790C\/C++\u5e38\u91cf\u5b57\u7b26\u4e32\u5c31\u662fchar *\u7c7b\u578b\uff0c\u4f46\u5728ObjC\u91cc\u9762\uff0c@\"hello\"\u8fd9\u79cd\u5b57\u7b26\u4e32\u5e76\u4e0d\u662fchar*\u7c7b\u578b\uff0c\u800c\u662fNSConstantString\u7c7b\u578b\uff0c\u9700\u8981\u7528\u8fd9\u4e2a\u9009\u9879\u6307\u793a\u7f16\u8bd1\u5668\uff0c\u4e0d\u8981\u7528\u9519\u8bef\u7684char *\u7c7b\u578b\uff0c\u800c\u7528NSConstantString\u7c7b\u578b\u3002<\/p>\n\n\n\n<p>  \u53e6\u5916\uff0c-fconstant-string-class\u53ef\u4ee5\u6307\u5b9a\u81ea\u5b9a\u4e49\u5e38\u91cf\u5b57\u7b26\u4e32\u7684\u7c7b\u578b\uff0c\u5177\u4f53\u53ef\u53c2\u89c1\uff1a<a href=\"https:\/\/gcc.gnu.org\/onlinedocs\/gcc\/Constant-string-objects.html\">Constant string objects (Using the GNU Compiler Collection (GCC))<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u4f7f\u7528GNUStep\u7f16\u8bd1ObjC\uff0c\u4e00\u4e2a\u7ecf\u5e38\u9047\u5230\u7684\u9009\u9879\u662f-fconstant-string-class. \u5b83\u7684\u4f5c\u7528\u662f\u6307\u5b9a\u5e38\u91cf\u5b57\u7b26\u4e32\u6240\u4f7f\u7528\u7684class\u7c7b\u578b\u3002\u4e3a\u4ec0\u4e48\u5e38\u91cf\u5b57\u7b26\u4e32\u8981\u6307\u5b9a\u7c7b?\u6b63\u5e38GCC\u89e3\u6790C\/C&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[299],"tags":[],"class_list":["post-1738","post","type-post","status-publish","format-standard","hentry","category-think"],"views":88,"_links":{"self":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/1738","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/comments?post=1738"}],"version-history":[{"count":3,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/1738\/revisions"}],"predecessor-version":[{"id":4048,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/1738\/revisions\/4048"}],"wp:attachment":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/media?parent=1738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/categories?post=1738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/tags?post=1738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}