{"id":308,"date":"2013-01-19T15:44:00","date_gmt":"2013-01-19T07:44:00","guid":{"rendered":"http:\/\/nike0good.jp1.rpvhost.net\/213"},"modified":"2013-01-19T15:44:00","modified_gmt":"2013-01-19T07:44:00","slug":"extern","status":"publish","type":"post","link":"https:\/\/nike0good.com\/?p=308","title":{"rendered":"extern"},"content":{"rendered":"<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n1&nbsp;<strong>\u57fa\u672c\u89e3\u91ca<\/strong>\uff1aextern\u53ef\u4ee5\u7f6e\u4e8e<span style=\"color:rgb(255,0,0)\">\u53d8\u91cf\u6216\u8005\u51fd\u6570<\/span>\u524d\uff0c<span style=\"color:rgb(0,0,128)\">\u4ee5\u6807\u793a\u53d8\u91cf\u6216\u8005\u51fd\u6570\u7684\u5b9a\u4e49\u5728\u522b\u7684\u6587\u4ef6\u4e2d<\/span>\uff0c<span style=\"color:rgb(0,0,128)\">\u63d0\u793a\u7f16\u8bd1\u5668\u9047\u5230\u6b64\u53d8\u91cf\u548c\u51fd\u6570\u65f6\u5728\u5176\u4ed6\u6a21\u5757\u4e2d\u5bfb\u627e\u5176\u5b9a\u4e49<\/span>\u3002\u6b64\u5916extern\u4e5f\u53ef\u7528\u6765\u8fdb\u884c\u94fe\u63a5\u6307\u5b9a\u3002<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u4e5f\u5c31\u662f\u8bf4extern\u6709\u4e24\u4e2a\u4f5c\u7528\uff0c\u7b2c\u4e00\u4e2a,\u5f53\u5b83\u4e0e&quot;C&quot;\u4e00\u8d77\u8fde\u7528\u65f6\uff0c\u5982: extern &quot;C&quot; void fun(int a, int b);\u5219\u544a\u8bc9\u7f16\u8bd1\u5668\u5728\u7f16\u8bd1fun\u8fd9\u4e2a\u51fd\u6570\u540d\u65f6\u6309\u7740C\u7684\u89c4\u5219\u53bb\u7ffb\u8bd1\u76f8\u5e94\u7684\u51fd\u6570\u540d\u800c\u4e0d\u662fC&#43;&#43;\u7684\uff0cC&#43;&#43;\u7684\u89c4\u5219\u5728\u7ffb\u8bd1\u8fd9\u4e2a\u51fd\u6570\u540d\u65f6\u4f1a\u628afun\u8fd9\u4e2a\u540d\u5b57\u53d8\u5f97\u9762\u76ee\u5168\u975e\uff0c\u53ef\u80fd\u662ffun@aBc_int_int#%$\u4e5f\u53ef\u80fd\u662f\u522b\u7684\uff0c\u8fd9\u8981\u770b\u7f16\u8bd1\u5668\u7684&quot;\u813e\u6c14&quot;\u4e86(\u4e0d\u540c\u7684\u7f16\u8bd1\u5668\u91c7\u7528\u7684\u65b9\u6cd5\u4e0d\u4e00\u6837)\uff0c\u4e3a\u4ec0\u4e48\u8fd9\u4e48\u505a\u5462\uff0c\u56e0\u4e3aC&#43;&#43;\u652f\u6301\u51fd\u6570\u7684\u91cd\u8f7d\u554a\uff0c\u5728\u8fd9\u91cc\u4e0d\u53bb\u8fc7\u591a\u7684\u8bba\u8ff0\u8fd9\u4e2a\u95ee\u9898\uff0c\u5982\u679c\u4f60\u6709\u5174\u8da3\u53ef\u4ee5\u53bb\u7f51\u4e0a\u641c\u7d22\uff0c\u76f8\u4fe1\u4f60\u53ef\u4ee5\u5f97\u5230\u6ee1\u610f\u7684\u89e3\u91ca!<br \/>\n&nbsp;&nbsp;&nbsp; \u7b2c\u4e8c\uff0c\u5f53extern\u4e0d\u4e0e&quot;C&quot;\u5728\u4e00\u8d77\u4fee\u9970\u53d8\u91cf\u6216\u51fd\u6570\u65f6\uff0c\u5982\u5728\u5934\u6587\u4ef6\u4e2d: extern int g_Int;&nbsp;\u5b83\u7684\u4f5c\u7528\u5c31\u662f\u58f0\u660e\u51fd\u6570\u6216\u5168\u5c40\u53d8\u91cf\u7684\u4f5c\u7528\u8303\u56f4\u7684\u5173\u952e\u5b57\uff0c\u5176\u58f0\u660e\u7684\u51fd\u6570\u548c\u53d8\u91cf\u53ef\u4ee5\u5728\u672c\u6a21\u5757\u6d3b\u5176\u4ed6\u6a21\u5757\u4e2d\u4f7f\u7528\uff0c\u8bb0\u4f4f\u5b83\u662f\u4e00\u4e2a\u58f0\u660e\u4e0d\u662f\u5b9a\u4e49!\u4e5f\u5c31\u662f\u8bf4B\u6a21\u5757(\u7f16\u8bd1\u5355\u5143)\u8981\u662f\u5f15\u7528\u6a21\u5757(\u7f16\u8bd1\u5355\u5143)A\u4e2d\u5b9a\u4e49\u7684\u5168\u5c40\u53d8\u91cf\u6216\u51fd\u6570\u65f6\uff0c\u5b83\u53ea\u8981\u5305\u542bA\u6a21\u5757\u7684\u5934\u6587\u4ef6\u5373\u53ef,\u5728\u7f16\u8bd1\u9636\u6bb5\uff0c\u6a21\u5757B\u867d\u7136\u627e\u4e0d\u5230\u8be5\u51fd\u6570\u6216\u53d8\u91cf\uff0c\u4f46\u5b83\u4e0d\u4f1a\u62a5\u9519\uff0c\u5b83\u4f1a\u5728\u8fde\u63a5\u65f6\u4ece\u6a21\u5757A\u751f\u6210\u7684\u76ee\u6807\u4ee3\u7801\u4e2d\u627e\u5230\u6b64\u51fd\u6570\u3002<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n2 \u95ee\u9898\uff1a<strong>extern \u53d8\u91cf<\/strong><br \/>\n\u3000\u3000\u5728\u4e00\u4e2a\u6e90\u6587\u4ef6\u91cc\u5b9a\u4e49\u4e86\u4e00\u4e2a\u6570\u7ec4\uff1achar a[6];<br \/>\n\u3000\u3000\u5728\u53e6\u5916\u4e00\u4e2a\u6587\u4ef6\u91cc\u7528\u4e0b\u5217\u8bed\u53e5\u8fdb\u884c\u4e86\u58f0\u660e\uff1aextern char *a\uff1b<br \/>\n\u3000\u3000\u8bf7\u95ee\uff0c\u8fd9\u6837\u53ef\u4ee5\u5417\uff1f&nbsp;<br \/>\n\u3000\u3000\u7b54\u6848\u4e0e\u5206\u6790\uff1a<br \/>\n\u3000\u30001)\u3001\u4e0d\u53ef\u4ee5\uff0c\u7a0b\u5e8f\u8fd0\u884c\u65f6\u4f1a\u544a\u8bc9\u4f60\u975e\u6cd5\u8bbf\u95ee\u3002\u539f\u56e0\u5728\u4e8e\uff0c<span style=\"color:rgb(255,0,0)\">\u6307\u5411\u7c7b\u578bT\u7684\u6307\u9488\u5e76\u4e0d\u7b49\u4ef7\u4e8e\u7c7b\u578bT\u7684\u6570\u7ec4<\/span>\u3002extern char *a\u58f0\u660e\u7684\u662f\u4e00\u4e2a\u6307\u9488\u53d8\u91cf\u800c\u4e0d\u662f\u5b57\u7b26\u6570\u7ec4\uff0c\u56e0\u6b64\u4e0e\u5b9e\u9645\u7684\u5b9a\u4e49\u4e0d\u540c\uff0c\u4ece\u800c\u9020\u6210\u8fd0\u884c\u65f6\u975e\u6cd5\u8bbf\u95ee\u3002\u5e94\u8be5\u5c06\u58f0\u660e\u6539\u4e3a<strong>extern char a[ ]<\/strong>\u3002<br \/>\n\u3000\u30002)\u3001\u4f8b\u5b50\u5206\u6790\u5982\u4e0b\uff0c\u5982\u679ca[] = &quot;abcd&quot;,\u5219\u5916\u90e8\u53d8\u91cfa=0x61626364 (abcd\u7684ASCII\u7801&#20540;)\uff0c*a\u663e\u7136\u6ca1\u6709\u610f\u4e49<br \/>\n\u3000\u3000\u663e\u7136a\u6307\u5411\u7684\u7a7a\u95f4\uff080x61626364\uff09\u6ca1\u6709\u610f\u4e49\uff0c\u6613\u51fa\u73b0\u975e\u6cd5\u5185\u5b58\u8bbf\u95ee\u3002<br \/>\n\u3000\u30003)\u3001\u8fd9\u63d0\u793a\u6211\u4eec\uff0c\u5728\u4f7f\u7528extern\u65f6\u5019\u8981\u4e25&#26684;\u5bf9\u5e94\u58f0\u660e\u65f6\u7684&#26684;\u5f0f\uff0c\u5728\u5b9e\u9645\u7f16\u7a0b\u4e2d\uff0c\u8fd9\u6837\u7684\u9519\u8bef\u5c61\u89c1\u4e0d\u9c9c\u3002<br \/>\n\u3000\u30004)\u3001extern\u7528\u5728\u53d8\u91cf\u58f0\u660e\u4e2d\u5e38\u5e38\u6709\u8fd9\u6837\u4e00\u4e2a\u4f5c\u7528\uff0c<span style=\"color:rgb(0,0,128)\">\u4f60\u5728*.c\u6587\u4ef6\u4e2d\u58f0\u660e\u4e86\u4e00\u4e2a\u5168\u5c40\u7684\u53d8\u91cf\uff0c\u8fd9\u4e2a\u5168\u5c40\u7684\u53d8\u91cf\u5982\u679c\u8981\u88ab\u5f15\u7528\uff0c\u5c31\u653e\u5728*.h\u4e2d\u5e76\u7528extern\u6765\u58f0\u660e<\/span>\u3002<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n3 \u95ee\u9898\uff1a<strong>\u5f53\u65b9\u9762\u4fee\u6539extern \u51fd\u6570\u539f\u578b<\/strong><br \/>\n\u3000\u3000\u5f53\u51fd\u6570\u63d0\u4f9b\u65b9\u5355\u65b9\u9762\u4fee\u6539\u51fd\u6570\u539f\u578b\u65f6\uff0c\u5982\u679c\u4f7f\u7528\u65b9\u4e0d\u77e5\u60c5\u7ee7\u7eed\u6cbf\u7528\u539f\u6765\u7684extern\u7533\u660e\uff0c\u8fd9\u6837\u7f16\u8bd1\u65f6\u7f16\u8bd1\u5668\u4e0d\u4f1a\u62a5\u9519\u3002\u4f46\u662f\u5728\u8fd0\u884c\u8fc7\u7a0b\u4e2d\uff0c\u56e0\u4e3a\u5c11\u4e86\u6216\u8005\u591a\u4e86\u8f93\u5165\u53c2\u6570\uff0c\u5f80\u5f80\u4f1a\u7167\u6210\u7cfb\u7edf\u9519\u8bef\uff0c\u8fd9\u79cd\u60c5\u51b5\u5e94\u8be5\u5982\u4f55\u89e3\u51b3\uff1f<br \/>\n\u3000\u3000\u7b54\u6848\u4e0e\u5206\u6790\uff1a<br \/>\n\u3000\u3000\u76ee\u524d\u4e1a\u754c\u9488\u5bf9\u8fd9\u79cd\u60c5\u51b5\u7684\u5904\u7406\u6ca1\u6709\u4e00\u4e2a\u5f88\u5b8c\u7f8e\u7684\u65b9\u6848\uff0c\u901a\u5e38\u7684\u505a\u6cd5\u662f\u63d0\u4f9b\u65b9\u5728\u81ea\u5df1\u7684xxx_pub.h\u4e2d\u63d0\u4f9b\u5bf9\u5916\u90e8\u63a5\u53e3\u7684\u58f0\u660e\uff0c\u7136\u540e\u8c03\u7528\u65b9include\u8be5\u5934\u6587\u4ef6\uff0c\u4ece\u800c\u7701\u53bbextern\u8fd9\u4e00\u6b65\u3002\u4ee5\u907f\u514d\u8fd9\u79cd\u9519\u8bef\u3002<br \/>\n\u3000\u3000\u5b9d\u5251\u6709\u53cc\u950b\uff0c\u5bf9extern\u7684\u5e94\u7528\uff0c\u4e0d\u540c\u7684\u573a\u5408\u5e94\u8be5\u9009\u62e9\u4e0d\u540c\u7684\u505a\u6cd5\u3002<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n4 \u95ee\u9898\uff1a<strong>extern \u201cC\u201d<\/strong><br \/>\n\u3000\u3000\u5728C&#43;&#43;\u73af\u5883\u4e0b\u4f7f\u7528C\u51fd\u6570\u7684\u65f6\u5019\uff0c\u5e38\u5e38\u4f1a\u51fa\u73b0\u7f16\u8bd1\u5668\u65e0\u6cd5\u627e\u5230obj\u6a21\u5757\u4e2d\u7684C\u51fd\u6570\u5b9a\u4e49\uff0c\u4ece\u800c\u5bfc\u81f4\u94fe\u63a5\u5931\u8d25\u7684\u60c5\u51b5\uff0c\u5e94\u8be5\u5982\u4f55\u89e3\u51b3\u8fd9\u79cd\u60c5\u51b5\u5462\uff1f<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n\u3000\u3000\u7b54\u6848\u4e0e\u5206\u6790\uff1a<br \/>\n\u3000\u3000C&#43;&#43;\u8bed\u8a00\u5728\u7f16\u8bd1\u7684\u65f6\u5019\u4e3a\u4e86\u89e3\u51b3\u51fd\u6570\u7684\u591a\u6001\u95ee\u9898\uff0c<span style=\"color:rgb(255,0,0)\">\u4f1a\u5c06\u51fd\u6570\u540d\u548c\u53c2\u6570\u8054\u5408\u8d77\u6765\u751f\u6210\u4e00\u4e2a\u4e2d\u95f4\u7684\u51fd\u6570\u540d\u79f0<\/span>\uff0c\u800cC\u8bed\u8a00\u5219\u4e0d\u4f1a\uff0c\u56e0\u6b64\u4f1a\u9020\u6210\u94fe\u63a5\u65f6\u627e\u4e0d\u5230\u5bf9\u5e94\u51fd\u6570\u7684\u60c5\u51b5\uff0c\u6b64\u65f6C\u51fd\u6570\u5c31\u9700\u8981\u7528extern \u201cC\u201d\u8fdb\u884c\u94fe\u63a5\u6307\u5b9a\uff0c\u8fd9\u544a\u8bc9\u7f16\u8bd1\u5668\uff0c\u8bf7\u4fdd\u6301\u6211\u7684\u540d\u79f0\uff0c\u4e0d\u8981\u7ed9\u6211\u751f\u6210\u7528\u4e8e\u94fe\u63a5\u7684\u4e2d\u95f4\u51fd\u6570\u540d\u3002<br \/>\n\u3000\u3000\u4e0b\u9762\u662f\u4e00\u4e2a\u6807\u51c6\u7684\u5199\u6cd5\uff1a<br \/>\n\/\/\u5728.h\u6587\u4ef6\u7684\u5934\u4e0a<br \/>\n#ifdef __cplusplus<br \/>\n#if __cplusplus<br \/>\nextern &quot;C&quot;{<br \/>\n\u3000#endif<br \/>\n\u3000#endif \/* __cplusplus *\/&nbsp;<br \/>\n\u3000\u2026<br \/>\n\u3000\u2026<br \/>\n\u3000\/\/.h\u6587\u4ef6\u7ed3\u675f\u7684\u5730\u65b9<br \/>\n\u3000#ifdef __cplusplus<br \/>\n\u3000#if __cplusplus<br \/>\n}<br \/>\n#endif<br \/>\n#endif \/* __cplusplus *\/&nbsp;<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n5 \u95ee\u9898\uff1a<strong>extern \u51fd\u6570\u58f0\u660e<\/strong><br \/>\n\u3000\u3000\u5e38\u5e38\u89c1extern\u653e\u5728\u51fd\u6570\u7684\u524d\u9762\u6210\u4e3a\u51fd\u6570\u58f0\u660e\u7684\u4e00\u90e8\u5206\uff0c\u90a3\u4e48\uff0cC\u8bed\u8a00\u7684\u5173\u952e\u5b57extern\u5728\u51fd\u6570\u7684\u58f0\u660e\u4e2d\u8d77\u4ec0\u4e48\u4f5c\u7528\uff1f<br \/>\n\u3000\u3000\u7b54\u6848\u4e0e\u5206\u6790\uff1a<br \/>\n\u3000\u3000\u5982\u679c\u51fd\u6570\u7684\u58f0\u660e\u4e2d\u5e26\u6709\u5173\u952e\u5b57extern\uff0c\u4ec5\u4ec5\u662f\u6697\u793a\u8fd9\u4e2a\u51fd\u6570\u53ef\u80fd\u5728\u522b\u7684\u6e90\u6587\u4ef6\u91cc\u5b9a\u4e49\uff0c\u6ca1\u6709\u5176\u5b83\u4f5c\u7528\u3002\u5373\u4e0b\u8ff0\u4e24\u4e2a\u51fd\u6570\u58f0\u660e\u6ca1\u6709\u660e\u663e\u7684\u533a\u522b\uff1a<br \/>\nextern int f(); \u548cint f();<br \/>\n\u3000\u3000\u5f53\u7136\uff0c\u8fd9\u6837\u7684\u7528\u5904\u8fd8\u662f\u6709\u7684\uff0c\u5c31\u662f\u5728\u7a0b\u5e8f\u4e2d\u53d6\u4ee3include \u201c*.h\u201d\u6765\u58f0\u660e\u51fd\u6570\uff0c\u5728\u4e00\u4e9b\u590d\u6742\u7684\u9879\u76ee\u4e2d\uff0c\u6211\u6bd4\u8f83\u4e60\u60ef\u5728\u6240\u6709\u7684\u51fd\u6570\u58f0\u660e\u524d\u6dfb\u52a0extern\u4fee\u9970\u3002\u5173\u4e8e\u8fd9\u6837\u505a\u7684\u539f\u56e0\u548c\u5229\u5f0a\u53ef\u89c1\u4e0b\u9762\u7684\u8fd9\u4e2a\u4f8b\u5b50\uff1a\u201c\u7528extern\u4fee\u9970\u7684\u5168\u5c40\u53d8\u91cf\u201d<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n&nbsp;&nbsp;&nbsp; (1) \u5728test1.h\u4e2d\u6709\u4e0b\u5217\u58f0\u660e:<br \/>\n&nbsp;&nbsp;&nbsp; #ifndef TEST1H<br \/>\n&nbsp;&nbsp;&nbsp; #define TEST1H<br \/>\n&nbsp;&nbsp;&nbsp; extern char g_str[]; \/\/ \u58f0\u660e\u5168\u5c40\u53d8\u91cfg_str<br \/>\n&nbsp;&nbsp;&nbsp; void fun1();<br \/>\n&nbsp;&nbsp;&nbsp; #endif<br \/>\n&nbsp;&nbsp;&nbsp; (2) \u5728test1.cpp\u4e2d<br \/>\n&nbsp;&nbsp;&nbsp; #include &quot;test1.h&quot;<br \/>\n&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; char g_str[] = &quot;123456&quot;; \/\/ \u5b9a\u4e49\u5168\u5c40\u53d8\u91cfg_str<br \/>\n&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; void fun1() { cout &lt;&lt; g_str &lt;&lt; endl; }<br \/>\n&nbsp;&nbsp;&nbsp; (3) \u4ee5\u4e0a\u662ftest1\u6a21\u5757\uff0c \u5b83\u7684\u7f16\u8bd1\u548c\u8fde\u63a5\u90fd\u53ef\u4ee5\u901a\u8fc7,\u5982\u679c\u6211\u4eec\u8fd8\u6709test2\u6a21\u5757\u4e5f\u60f3\u4f7f\u7528g_str,\u53ea\u9700\u8981\u5728\u539f\u6587\u4ef6\u4e2d\u5f15\u7528\u5c31\u53ef\u4ee5\u4e86<br \/>\n&nbsp;&nbsp;&nbsp; #include &quot;test1.h&quot;<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n&nbsp;&nbsp;&nbsp;&nbsp; void fun2()&nbsp;&nbsp;&nbsp; { cout &lt;&lt; g_str &lt;&lt; endl;&nbsp;&nbsp;&nbsp; }<br \/>\n&nbsp;&nbsp;&nbsp; \u4ee5\u4e0atest1\u548ctest2\u53ef\u4ee5\u540c\u65f6\u7f16\u8bd1\u8fde\u63a5\u901a\u8fc7\uff0c\u5982\u679c\u4f60\u611f\u5174\u8da3\u7684\u8bdd\u53ef\u4ee5\u7528ultraEdit\u6253\u5f00test1.obj,\u4f60\u53ef\u4ee5\u5728\u91cc\u9762\u627e\u5230&quot;123456&quot;\u8fd9\u4e2a\u5b57\u7b26\u4e32,\u4f46\u662f\u4f60\u5374\u4e0d\u80fd\u5728test2.obj\u91cc\u9762\u627e\u5230\uff0c\u8fd9\u662f\u56e0\u4e3ag_str\u662f\u6574\u4e2a\u5de5\u7a0b\u7684\u5168\u5c40\u53d8\u91cf\uff0c\u5728\u5185\u5b58\u4e2d\u53ea\u5b58\u5728\u4e00\u4efd,test2.obj\u8fd9\u4e2a\u7f16\u8bd1\u5355\u5143\u4e0d\u9700\u8981\u518d\u6709\u4e00\u4efd\u4e86\uff0c\u4e0d\u7136\u4f1a\u5728\u8fde\u63a5\u65f6\u62a5\u544a\u91cd\u590d\u5b9a\u4e49\u8fd9\u4e2a\u9519\u8bef!<br \/>\n&nbsp;&nbsp;&nbsp; (4) \u6709\u4e9b\u4eba\u559c\u6b22<span style=\"color:rgb(255,0,0)\">\u628a\u5168\u5c40\u53d8\u91cf\u7684\u58f0\u660e\u548c\u5b9a\u4e49\u653e\u5728\u4e00\u8d77<\/span>\uff0c\u8fd9\u6837\u53ef\u4ee5\u9632\u6b62\u5fd8\u8bb0\u4e86\u5b9a\u4e49\uff0c\u5982\u628a\u4e0a\u9762test1.h\u6539\u4e3a<br \/>\n&nbsp;&nbsp;&nbsp; extern char g_str[] = &quot;123456&quot;; \/\/ \u8fd9\u4e2a\u65f6\u5019\u76f8\u5f53\u4e8e\u6ca1\u6709extern<br \/>\n&nbsp;&nbsp;&nbsp; \u7136\u540e\u628atest1.cpp\u4e2d\u7684g_str\u7684\u5b9a\u4e49\u53bb\u6389,\u8fd9\u4e2a\u65f6\u5019\u518d<span style=\"color:rgb(255,0,0)\">\u7f16\u8bd1\u8fde\u63a5test1\u548ctest2\u4e24\u4e2a\u6a21\u5757\u65f6\uff0c\u4f1a\u62a5\u8fde\u63a5\u9519\u8bef<\/span>\uff0c\u8fd9\u662f\u56e0\u4e3a\u4f60\u628a\u5168\u5c40\u53d8\u91cfg_str\u7684\u5b9a\u4e49\u653e\u5728\u4e86\u5934\u6587\u4ef6\u4e4b\u540e\uff0ctest1.cpp\u8fd9\u4e2a\u6a21\u5757\u5305\u542b\u4e86test1.h\u6240\u4ee5\u5b9a\u4e49\u4e86\u4e00\u6b21g_str,\u800ctest2.cpp\u4e5f\u5305\u542b\u4e86test1.h\u6240\u4ee5\u518d\u4e00\u6b21\u5b9a\u4e49\u4e86g_str,\u8fd9\u4e2a\u65f6\u5019\u8fde\u63a5\u5668\u5728\u8fde\u63a5test1\u548ctest2\u65f6\u53d1\u73b0\u4e24\u4e2ag_str\u3002\u5982\u679c\u4f60<span style=\"color:rgb(255,0,0)\">\u975e\u8981\u628ag_str\u7684\u5b9a\u4e49\u653e\u5728test1.h\u4e2d\u7684\u8bdd\uff0c\u90a3\u4e48\u5c31\u628atest2\u7684\u4ee3\u7801\u4e2d#include<br \/>\n &quot;test1.h&quot;\u53bb\u6389&nbsp;<\/span>\u6362\u6210:<br \/>\n&nbsp;&nbsp;&nbsp; extern char g_str[];<br \/>\n&nbsp;&nbsp;&nbsp; void fun2()&nbsp;&nbsp; {&nbsp; cout &lt;&lt; g_str &lt;&lt; endl;&nbsp;&nbsp; }<br \/>\n&nbsp;&nbsp;&nbsp;\u8fd9\u4e2a\u65f6\u5019\u7f16\u8bd1\u5668\u5c31\u77e5\u9053g_str\u662f\u5f15\u81ea\u4e8e\u5916\u90e8\u7684\u4e00\u4e2a\u7f16\u8bd1\u6a21\u5757\u4e86\uff0c\u4e0d\u4f1a\u5728\u672c\u6a21\u5757\u4e2d\u518d\u91cd\u590d\u5b9a\u4e49\u4e00\u4e2a\u51fa\u6765\uff0c\u4f46\u662f\u6211\u60f3\u8bf4\u8fd9\u6837\u505a\u975e\u5e38\u7cdf\u7cd5\uff0c\u56e0\u4e3a\u4f60\u7531\u4e8e<span style=\"color:rgb(255,0,0)\">\u65e0\u6cd5\u5728test2.cpp\u4e2d\u4f7f\u7528#include &quot;test1.h&quot;,\u90a3\u4e48test1.h\u4e2d\u58f0\u660e\u7684\u5176\u4ed6\u51fd\u6570\u4f60\u4e5f\u65e0\u6cd5\u4f7f\u7528<\/span>\u4e86\uff0c\u9664\u975e\u4e5f\u7528\u90fd\u7528extern\u4fee\u9970\uff0c\u8fd9\u6837\u7684\u8bdd\u4f60\u5149\u58f0\u660e\u7684\u51fd\u6570\u5c31\u8981\u4e00\u5927\u4e32\uff0c\u800c\u4e14\u5934\u6587\u4ef6\u7684\u4f5c\u7528\u5c31\u662f\u8981\u7ed9\u5916\u90e8\u63d0\u4f9b\u63a5\u53e3\u4f7f\u7528\u7684\uff0c\u6240\u4ee5 \u8bf7\u8bb0\u4f4f\uff0c&nbsp;<strong><span style=\"color:rgb(51,51,153)\">\u53ea\u5728\u5934\u6587\u4ef6\u4e2d\u505a\u58f0\u660e\uff0c\u771f\u7406\u603b\u662f\u8fd9\u4e48\u7b80\u5355<\/span><\/strong>\u3002<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n6. extern \u548c static<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n&nbsp;(1) extern \u8868\u660e\u8be5\u53d8\u91cf\u5728\u522b\u7684\u5730\u65b9\u5df2\u7ecf\u5b9a\u4e49\u8fc7\u4e86,\u5728\u8fd9\u91cc\u8981\u4f7f\u7528\u90a3\u4e2a\u53d8\u91cf.<br \/>\n&nbsp;(2) static \u8868\u793a\u9759\u6001\u7684\u53d8\u91cf\uff0c\u5206\u914d\u5185\u5b58\u7684\u65f6\u5019, \u5b58\u50a8\u5728\u9759\u6001\u533a,\u4e0d\u5b58\u50a8\u5728\u6808\u4e0a\u9762.<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n&nbsp; &nbsp; static \u4f5c\u7528\u8303\u56f4\u662f\u5185\u90e8\u8fde\u63a5\u7684\u5173\u7cfb, \u548cextern\u6709\u70b9\u76f8\u53cd.\u5b83\u548c\u5bf9\u8c61\u672c\u8eab\u662f\u5206\u5f00\u5b58\u50a8\u7684,extern\u4e5f\u662f\u5206\u5f00\u5b58\u50a8\u7684,\u4f46\u662fextern\u53ef\u4ee5\u88ab\u5176\u4ed6\u7684\u5bf9\u8c61\u7528extern \u5f15\u7528,\u800cstatic \u4e0d\u53ef\u4ee5,\u53ea\u5141\u8bb8\u5bf9\u8c61\u672c\u8eab\u7528\u5b83. \u5177\u4f53\u5dee\u522b\u9996\u5148\uff0cstatic\u4e0eextern\u662f\u4e00\u5bf9\u201c\u6c34\u706b\u4e0d\u5bb9\u201d\u7684\u5bb6\u4f19\uff0c\u4e5f\u5c31\u662f\u8bf4<span style=\"color:rgb(255,0,0)\">extern\u548cstatic\u4e0d\u80fd\u540c\u65f6\u4fee\u9970\u4e00\u4e2a\u53d8<\/span><span style=\"color:rgb(255,0,0)\">\u91cf<\/span>\uff1b\u5176\u6b21\uff0c<span style=\"color:rgb(255,0,0)\">static\u4fee\u9970\u7684\u5168\u5c40\u53d8\u91cf\u58f0\u660e\u4e0e\u5b9a\u4e49\u540c\u65f6\u8fdb\u884c<\/span>\uff0c\u4e5f\u5c31\u662f\u8bf4\u5f53\u4f60\u5728\u5934\u6587\u4ef6\u4e2d\u4f7f\u7528static\u58f0\u660e\u4e86\u5168\u5c40\u53d8\u91cf\u540e\uff0c\u5b83\u4e5f\u540c\u65f6\u88ab\u5b9a\u4e49\u4e86\uff1b\u6700\u540e\uff0c<span style=\"color:rgb(255,0,0)\">static\u4fee\u9970\u5168\u5c40\u53d8\u91cf\u7684\u4f5c\u7528\u57df\u53ea\u80fd\u662f\u672c\u8eab\u7684\u7f16\u8bd1\u5355\u5143<\/span>\uff0c\u4e5f\u5c31\u662f\u8bf4\u5b83\u7684\u201c\u5168\u5c40\u201d\u53ea\u5bf9\u672c\u7f16\u8bd1\u5355\u5143\u6709\u6548\uff0c\u5176\u4ed6\u7f16\u8bd1\u5355\u5143\u5219\u770b\u4e0d\u5230\u5b83,\u5982:<br \/>\n&nbsp;&nbsp;&nbsp; (1) test1.h:<br \/>\n&nbsp;&nbsp;&nbsp; #ifndef TEST1H<br \/>\n&nbsp;&nbsp;&nbsp; #define TEST1H<br \/>\n&nbsp;&nbsp;&nbsp; static char g_str[] = &quot;123456&quot;;&nbsp;<br \/>\n&nbsp;&nbsp;&nbsp; void fun1();<br \/>\n&nbsp;&nbsp;&nbsp; #endif<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n&nbsp;&nbsp;&nbsp; (2) test1.cpp:<br \/>\n&nbsp;&nbsp;&nbsp; #include &quot;test1.h&quot;<br \/>\n&nbsp;&nbsp;&nbsp; void fun1()&nbsp; {&nbsp;&nbsp; cout &lt;&lt; g_str &lt;&lt; endl;&nbsp; }<br \/>\n&nbsp;&nbsp;&nbsp; (3) test2.cpp<br \/>\n&nbsp;&nbsp;&nbsp; #include &quot;test1.h&quot;<br \/>\n&nbsp;&nbsp;&nbsp; void fun2()&nbsp; { &nbsp; cout &lt;&lt; g_str &lt;&lt; endl;&nbsp; }<br \/>\n&nbsp;&nbsp;&nbsp; \u4ee5\u4e0a\u4e24\u4e2a\u7f16\u8bd1\u5355\u5143\u53ef\u4ee5\u8fde\u63a5\u6210\u529f, \u5f53\u4f60\u6253\u5f00test1.obj\u65f6\uff0c\u4f60\u53ef\u4ee5\u5728\u5b83\u91cc\u9762\u627e\u5230\u5b57\u7b26\u4e32&quot;123456&quot;,\u540c\u65f6\u4f60\u4e5f\u53ef\u4ee5\u5728test2.obj\u4e2d\u627e\u5230\u5b83\u4eec\uff0c\u5b83\u4eec\u4e4b\u6240\u4ee5\u53ef\u4ee5\u8fde\u63a5\u6210\u529f\u800c\u6ca1\u6709\u62a5\u91cd\u590d\u5b9a\u4e49\u7684\u9519\u8bef\u662f\u56e0\u4e3a<span style=\"color:rgb(255,0,0)\">\u867d\u7136\u5b83\u4eec\u6709\u76f8\u540c\u7684\u5185\u5bb9\uff0c\u4f46\u662f\u5b58\u50a8\u7684\u7269\u7406\u5730\u5740\u5e76\u4e0d\u4e00\u6837<\/span>\uff0c\u5c31\u50cf\u662f\u4e24\u4e2a\u4e0d\u540c\u53d8\u91cf\u8d4b\u4e86\u76f8\u540c\u7684&#20540;\u4e00\u6837\uff0c\u800c\u8fd9\u4e24\u4e2a\u53d8\u91cf\u5206\u522b\u4f5c\u7528\u4e8e\u5b83\u4eec\u5404\u81ea\u7684\u7f16\u8bd1\u5355\u5143\u3002 \u4e5f\u8bb8\u4f60\u6bd4\u8f83\u8f83\u771f\uff0c\u81ea\u5df1\u5077\u5077\u7684\u8ddf\u8e2a\u8c03\u8bd5\u4e0a\u9762\u7684\u4ee3\u7801,\u7ed3\u679c\u4f60\u53d1\u73b0\u4e24\u4e2a\u7f16\u8bd1\u5355\u5143\uff08test1,test2\uff09\u7684g_str\u7684\u5185\u5b58\u5730\u5740\u76f8\u540c\uff0c\u4e8e\u662f\u4f60\u4e0b\u7ed3\u8bbastatic\u4fee\u9970\u7684\u53d8\u91cf\u4e5f\u53ef\u4ee5\u4f5c\u7528\u4e8e\u5176\u4ed6\u6a21\u5757\uff0c\u4f46\u662f\u6211\u8981\u544a\u8bc9\u4f60\uff0c\u90a3\u662f\u4f60\u7684\u7f16\u8bd1\u5668\u5728\u6b3a\u9a97\u4f60\uff0c\u5927\u591a\u6570\u7f16\u8bd1\u5668\u90fd\u5bf9\u4ee3\u7801\u90fd\u6709\u4f18\u5316\u529f\u80fd\uff0c\u4ee5\u8fbe\u5230\u751f\u6210\u7684\u76ee\u6807\u7a0b\u5e8f\u66f4\u8282\u7701\u5185\u5b58\uff0c\u6267\u884c\u6548\u7387\u66f4\u9ad8\uff0c\u5f53\u7f16\u8bd1\u5668\u5728\u8fde\u63a5\u5404\u4e2a\u7f16\u8bd1\u5355\u5143\u7684\u65f6\u5019\uff0c\u5b83\u4f1a\u628a\u76f8\u540c\u5185\u5bb9\u7684\u5185\u5b58\u53ea\u62f7\u8d1d\u4e00\u4efd\uff0c\u6bd4\u5982\u4e0a\u9762\u7684&quot;123456&quot;,<br \/>\n \u4f4d\u4e8e\u4e24\u4e2a\u7f16\u8bd1\u5355\u5143\u4e2d\u7684\u53d8\u91cf\u90fd\u662f\u540c\u6837\u7684\u5185\u5bb9\uff0c\u90a3\u4e48\u5728\u8fde\u63a5\u7684\u65f6\u5019\u5b83\u5728\u5185\u5b58\u4e2d\u5c31\u53ea\u4f1a\u5b58\u5728\u4e00\u4efd\u4e86\uff0c\u5982\u679c\u4f60\u628a\u4e0a\u9762\u7684\u4ee3\u7801\u6539\u6210\u4e0b\u9762\u7684\u6837\u5b50\uff0c\u4f60\u9a6c\u4e0a\u5c31\u53ef\u4ee5\u62c6\u7a7f\u7f16\u8bd1\u5668\u7684\u8c0e\u8a00:<br \/>\n&nbsp;&nbsp;&nbsp; (1) test1.cpp:<br \/>\n&nbsp;&nbsp;&nbsp; #include &quot;test1.h&quot;<br \/>\n&nbsp;&nbsp;&nbsp; void fun1()<br \/>\n&nbsp;&nbsp;&nbsp; {<br \/>\n&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; g_str[0] = ''a'';<br \/>\n&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cout &lt;&lt; g_str &lt;&lt; endl;<br \/>\n&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n&nbsp;&nbsp;&nbsp; (2) test2.cpp<br \/>\n&nbsp;&nbsp;&nbsp; #include &quot;test1.h&quot;<br \/>\n&nbsp;&nbsp;&nbsp; void fun2()&nbsp; {&nbsp; cout &lt;&lt; g_str &lt;&lt; endl;&nbsp; }<br \/>\n&nbsp;&nbsp;&nbsp; (3) void main() &nbsp;&nbsp;&nbsp; {<br \/>\n&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fun1(); \/\/ a23456<br \/>\n&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fun2(); \/\/ 123456<br \/>\n&nbsp;&nbsp;&nbsp; }<br \/>\n&nbsp;&nbsp;&nbsp; \u8fd9\u4e2a\u65f6\u5019\u4f60\u5728\u8ddf\u8e2a\u4ee3\u7801\u65f6\uff0c\u5c31\u4f1a\u53d1\u73b0\u4e24\u4e2a\u7f16\u8bd1\u5355\u5143\u4e2d\u7684g_str\u5730\u5740\u5e76\u4e0d\u76f8\u540c\uff0c\u56e0\u4e3a\u4f60\u5728\u4e00\u5904\u4fee\u6539\u4e86\u5b83\uff0c\u6240\u4ee5\u7f16\u8bd1\u5668\u88ab\u5f3a\u884c\u7684\u6062\u590d\u5185\u5b58\u7684\u539f\u8c8c\uff0c\u5728\u5185\u5b58\u4e2d\u5b58\u5728\u4e86\u4e24\u4efd\u62f7\u8d1d\u7ed9\u4e24\u4e2a\u6a21\u5757\u4e2d\u7684\u53d8\u91cf\u4f7f\u7528\u3002\u6b63\u662f\u56e0\u4e3astatic\u6709\u4ee5\u4e0a\u7684\u7279\u6027\uff0c\u6240\u4ee5<span style=\"color:rgb(255,0,0)\">\u4e00\u822c\u5b9a\u4e49static\u5168\u5c40\u53d8\u91cf\u65f6\uff0c\u90fd\u628a\u5b83\u653e\u5728\u539f\u6587\u4ef6\u4e2d\u800c\u4e0d\u662f\u5934\u6587\u4ef6<\/span>\uff0c\u8fd9\u6837\u5c31\u4e0d\u4f1a\u7ed9\u5176\u4ed6\u6a21\u5757\u9020\u6210\u4e0d\u5fc5\u8981\u7684\u4fe1\u606f\u6c61\u67d3\uff0c\u540c\u6837\u8bb0\u4f4f\u8fd9\u4e2a\u539f\u5219\u5427\uff01<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n7. extern \u548cconst<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n&nbsp;&nbsp; C&#43;&#43;\u4e2dconst\u4fee\u9970\u7684\u5168\u5c40\u5e38\u91cf\u636e\u6709\u8ddfstatic\u76f8\u540c\u7684\u7279\u6027\uff0c\u5373\u5b83\u4eec\u53ea\u80fd\u4f5c\u7528\u4e8e\u672c\u7f16\u8bd1\u6a21\u5757\u4e2d\uff0c\u4f46\u662f<span style=\"color:rgb(51,51,153)\">const\u53ef\u4ee5\u4e0eextern\u8fde\u7528\u6765\u58f0\u660e\u8be5\u5e38\u91cf\u53ef\u4ee5\u4f5c\u7528\u4e8e\u5176\u4ed6\u7f16\u8bd1\u6a21\u5757\u4e2d<\/span>, \u5982extern const char g_str[];<br \/>\n&nbsp;&nbsp;&nbsp; \u7136\u540e\u5728\u539f\u6587\u4ef6\u4e2d\u522b\u5fd8\u4e86\u5b9a\u4e49: &nbsp;&nbsp;&nbsp; const char g_str[] = &quot;123456&quot;;&nbsp;<\/p>\n<p style=\"margin:10px auto; font-family:verdana; font-size:14px; line-height:22px\">\n&nbsp;&nbsp;&nbsp; \u6240\u4ee5\u5f53const\u5355\u72ec\u4f7f\u7528\u65f6\u5b83\u5c31\u4e0estatic\u76f8\u540c\uff0c\u800c\u5f53\u4e0eextern\u4e00\u8d77\u5408\u4f5c\u7684\u65f6\u5019\uff0c\u5b83\u7684\u7279\u6027\u5c31\u8ddfextern\u7684\u4e00\u6837\u4e86\uff01\u6240\u4ee5\u5bf9const\u6211\u6ca1\u6709\u4ec0\u4e48\u53ef\u4ee5\u8fc7\u591a\u7684\u63cf\u8ff0\uff0c\u6211\u53ea\u662f\u60f3\u63d0\u9192\u4f60\uff0cconst char* g_str = &quot;123456&quot; \u4e0e const char g_str[] =&quot;123465&quot;\u662f\u4e0d\u540c\u7684\uff0c \u524d\u9762\u90a3\u4e2aconst \u4fee\u9970\u7684\u662fchar *\u800c\u4e0d\u662fg_str,\u5b83\u7684g_str\u5e76\u4e0d\u662f\u5e38\u91cf\uff0c\u5b83\u88ab\u770b\u505a\u662f\u4e00\u4e2a\u5b9a\u4e49\u4e86\u7684\u5168\u5c40\u53d8\u91cf\uff08\u53ef\u4ee5\u88ab\u5176\u4ed6\u7f16\u8bd1\u5355\u5143\u4f7f\u7528\uff09\uff0c \u6240\u4ee5\u5982\u679c\u4f60\u50cf\u8ba9char*g_str\u9075\u5b88const\u7684\u5168\u5c40\u5e38\u91cf\u7684\u89c4\u5219\uff0c\u6700\u597d\u8fd9\u4e48\u5b9a\u4e49const<br \/>\n char* const g_str=&quot;123456&quot;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1&nbsp;\u57fa\u672c\u89e3\u91ca\uff1aextern\u53ef\u4ee5\u7f6e\u4e8e\u53d8\u91cf\u6216\u8005\u51fd\u6570\u524d\uff0c\u4ee5\u6807\u793a\u53d8\u91cf\u6216\u8005\u51fd\u6570\u7684\u5b9a\u4e49\u5728\u522b\u7684\u6587\u4ef6\u4e2d\uff0c\u63d0\u793a\u7f16\u8bd1\u5668\u9047 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[3],"tags":[29],"class_list":["post-308","post","type-post","status-publish","format-standard","hentry","category-defaultcategory","tag-c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>extern - nike0good<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nike0good.com\/?p=308\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"extern - nike0good\" \/>\n<meta property=\"og:description\" content=\"1&nbsp;\u57fa\u672c\u89e3\u91ca\uff1aextern\u53ef\u4ee5\u7f6e\u4e8e\u53d8\u91cf\u6216\u8005\u51fd\u6570\u524d\uff0c\u4ee5\u6807\u793a\u53d8\u91cf\u6216\u8005\u51fd\u6570\u7684\u5b9a\u4e49\u5728\u522b\u7684\u6587\u4ef6\u4e2d\uff0c\u63d0\u793a\u7f16\u8bd1\u5668\u9047 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nike0good.com\/?p=308\" \/>\n<meta property=\"og:site_name\" content=\"nike0good\" \/>\n<meta property=\"article:published_time\" content=\"2013-01-19T07:44:00+00:00\" \/>\n<meta name=\"author\" content=\"nike0good\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"nike0good\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=308#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=308\"},\"author\":{\"name\":\"nike0good\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/#\\\/schema\\\/person\\\/4defa38da89de87e400861e73396baad\"},\"headline\":\"extern\",\"datePublished\":\"2013-01-19T07:44:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=308\"},\"wordCount\":665,\"commentCount\":0,\"keywords\":[\"C++\"],\"articleSection\":[\"DefaultCategory\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/nike0good.com\\\/?p=308#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=308\",\"url\":\"https:\\\/\\\/nike0good.com\\\/?p=308\",\"name\":\"extern - nike0good\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/#website\"},\"datePublished\":\"2013-01-19T07:44:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/#\\\/schema\\\/person\\\/4defa38da89de87e400861e73396baad\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=308#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/nike0good.com\\\/?p=308\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=308#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/nike0good.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"extern\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/#website\",\"url\":\"https:\\\/\\\/nike0good.com\\\/\",\"name\":\"nike0good\",\"description\":\"\u6709\u6240\u4f5c\u4e3a\u662f\u4eba\u751f\u7684\u6700\u9ad8\u5883\u754c\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/nike0good.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/#\\\/schema\\\/person\\\/4defa38da89de87e400861e73396baad\",\"name\":\"nike0good\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g\",\"caption\":\"nike0good\"},\"sameAs\":[\"https:\\\/\\\/nike0good.com\"],\"url\":\"https:\\\/\\\/nike0good.com\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"extern - nike0good","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nike0good.com\/?p=308","og_locale":"zh_CN","og_type":"article","og_title":"extern - nike0good","og_description":"1&nbsp;\u57fa\u672c\u89e3\u91ca\uff1aextern\u53ef\u4ee5\u7f6e\u4e8e\u53d8\u91cf\u6216\u8005\u51fd\u6570\u524d\uff0c\u4ee5\u6807\u793a\u53d8\u91cf\u6216\u8005\u51fd\u6570\u7684\u5b9a\u4e49\u5728\u522b\u7684\u6587\u4ef6\u4e2d\uff0c\u63d0\u793a\u7f16\u8bd1\u5668\u9047 [&hellip;]","og_url":"https:\/\/nike0good.com\/?p=308","og_site_name":"nike0good","article_published_time":"2013-01-19T07:44:00+00:00","author":"nike0good","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"nike0good","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nike0good.com\/?p=308#article","isPartOf":{"@id":"https:\/\/nike0good.com\/?p=308"},"author":{"name":"nike0good","@id":"https:\/\/nike0good.com\/#\/schema\/person\/4defa38da89de87e400861e73396baad"},"headline":"extern","datePublished":"2013-01-19T07:44:00+00:00","mainEntityOfPage":{"@id":"https:\/\/nike0good.com\/?p=308"},"wordCount":665,"commentCount":0,"keywords":["C++"],"articleSection":["DefaultCategory"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nike0good.com\/?p=308#respond"]}]},{"@type":"WebPage","@id":"https:\/\/nike0good.com\/?p=308","url":"https:\/\/nike0good.com\/?p=308","name":"extern - nike0good","isPartOf":{"@id":"https:\/\/nike0good.com\/#website"},"datePublished":"2013-01-19T07:44:00+00:00","author":{"@id":"https:\/\/nike0good.com\/#\/schema\/person\/4defa38da89de87e400861e73396baad"},"breadcrumb":{"@id":"https:\/\/nike0good.com\/?p=308#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nike0good.com\/?p=308"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/nike0good.com\/?p=308#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nike0good.com\/"},{"@type":"ListItem","position":2,"name":"extern"}]},{"@type":"WebSite","@id":"https:\/\/nike0good.com\/#website","url":"https:\/\/nike0good.com\/","name":"nike0good","description":"\u6709\u6240\u4f5c\u4e3a\u662f\u4eba\u751f\u7684\u6700\u9ad8\u5883\u754c","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nike0good.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/nike0good.com\/#\/schema\/person\/4defa38da89de87e400861e73396baad","name":"nike0good","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/secure.gravatar.com\/avatar\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g","caption":"nike0good"},"sameAs":["https:\/\/nike0good.com"],"url":"https:\/\/nike0good.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/posts\/308","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nike0good.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=308"}],"version-history":[{"count":0,"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/posts\/308\/revisions"}],"wp:attachment":[{"href":"https:\/\/nike0good.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nike0good.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nike0good.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}