{"id":63187,"date":"2026-01-21T14:17:45","date_gmt":"2026-01-21T06:17:45","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/63187.html"},"modified":"2026-01-21T14:17:45","modified_gmt":"2026-01-21T06:17:45","slug":"%e5%87%bd%e6%95%b0%e9%87%8d%e8%bd%bd%ef%bc%9ac-%e4%b8%ad%e5%90%8c%e5%90%8d%e5%87%bd%e6%95%b0%e7%9a%84%e5%ae%9e%e7%8e%b0%e5%8e%9f%e7%90%86%e4%b8%8e%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/63187.html","title":{"rendered":"\u51fd\u6570\u91cd\u8f7d\uff1aC++ \u4e2d\u540c\u540d\u51fd\u6570\u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u4f7f\u7528"},"content":{"rendered":"<h2>\u51fd\u6570\u91cd\u8f7d&#xff1a;C&#043;&#043; \u4e2d\u540c\u540d\u51fd\u6570\u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u4f7f\u7528<\/h2>\n<p>\u5728 C&#043;&#043; \u7f16\u7a0b\u4e2d&#xff0c;\u51fd\u6570\u4f5c\u4e3a\u6a21\u5757\u5316\u6838\u5fc3&#xff0c;\u5e38\u5e38\u9700\u8981\u5b9e\u73b0\u201c\u529f\u80fd\u76f8\u4f3c\u4f46\u53c2\u6570\u4e0d\u540c\u201d\u7684\u903b\u8f91\u2014\u2014\u6bd4\u5982\u8ba1\u7b97\u4e24\u4e2a\u6574\u6570\u7684\u548c\u3001\u4e24\u4e2a\u6d6e\u70b9\u6570\u7684\u548c&#xff0c;\u82e5\u4e3a\u6bcf\u79cd\u573a\u666f\u5b9a\u4e49\u4e0d\u540c\u540d\u79f0\u7684\u51fd\u6570&#xff08;\u5982 addInt\u3001addFloat&#xff09;&#xff0c;\u4f1a\u5bfc\u81f4\u51fd\u6570\u540d\u5197\u4f59\u3001\u4ee3\u7801\u53ef\u8bfb\u6027\u4e0b\u964d\u3002\u800c\u51fd\u6570\u91cd\u8f7d&#xff08;Function Overloading&#xff09; \u5141\u8bb8\u5728\u540c\u4e00\u4f5c\u7528\u57df\u5185\u5b9a\u4e49\u591a\u4e2a\u540c\u540d\u51fd\u6570&#xff0c;\u901a\u8fc7\u53c2\u6570\u5217\u8868\u7684\u5dee\u5f02\u533a\u5206\u4e0d\u540c\u5b9e\u73b0&#xff0c;\u5b8c\u7f8e\u89e3\u51b3\u4e86\u8fd9\u4e00\u95ee\u9898\u3002\u672c\u6587\u5c06\u4ece\u51fd\u6570\u91cd\u8f7d\u7684\u5b9a\u4e49\u3001\u4f7f\u7528\u89c4\u5219\u3001\u5b9e\u73b0\u539f\u7406\u3001\u9002\u7528\u573a\u666f\u56db\u4e2a\u7ef4\u5ea6&#xff0c;\u5e26\u4f60\u5403\u900f\u8fd9\u4e00 C&#043;&#043; \u6838\u5fc3\u7279\u6027&#xff0c;\u5199\u51fa\u66f4\u7b80\u6d01\u3001\u7075\u6d3b\u7684\u4ee3\u7801\u3002<\/p>\n<h3>\u4e00\u3001\u51fd\u6570\u91cd\u8f7d\u7684\u6838\u5fc3\u5b9a\u4e49&#xff1a;\u540c\u540d\u4e0d\u540c\u53c2<\/h3>\n<p>\u51fd\u6570\u91cd\u8f7d\u662f\u6307\u5728\u540c\u4e00\u4f5c\u7528\u57df\u4e2d&#xff0c;\u58f0\u660e\u591a\u4e2a\u540d\u79f0\u76f8\u540c\u4f46 \u53c2\u6570\u5217\u8868\u4e0d\u540c \u7684\u51fd\u6570&#xff0c;\u7f16\u8bd1\u5668\u4f1a\u6839\u636e\u8c03\u7528\u65f6\u4f20\u5165\u7684\u5b9e\u53c2&#xff0c;\u81ea\u52a8\u5339\u914d\u5bf9\u5e94\u7684\u51fd\u6570\u5b9e\u73b0\u3002\u6838\u5fc3\u8981\u70b9&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5fc5\u987b\u5728\u540c\u4e00\u4f5c\u7528\u57df&#xff08;\u5982\u5168\u5c40\u4f5c\u7528\u57df\u3001\u7c7b\u4f5c\u7528\u57df&#xff09;\u5185&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u51fd\u6570\u540d\u5b8c\u5168\u4e00\u81f4&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u53c2\u6570\u5217\u8868\u4e0d\u540c&#xff08;\u53c2\u6570\u4e2a\u6570\u3001\u53c2\u6570\u7c7b\u578b\u3001\u53c2\u6570\u987a\u5e8f\u81f3\u5c11\u6709\u4e00\u9879\u4e0d\u540c&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u8fd4\u56de\u503c\u7c7b\u578b\u4e0d\u80fd\u4f5c\u4e3a\u533a\u5206\u51fd\u6570\u91cd\u8f7d\u7684\u4f9d\u636e&#xff08;\u4ec5\u8fd4\u56de\u503c\u4e0d\u540c&#xff0c;\u53c2\u6570\u5217\u8868\u5b8c\u5168\u4e00\u81f4\u7684\u51fd\u6570&#xff0c;\u4e0d\u5c5e\u4e8e\u91cd\u8f7d&#xff0c;\u4f1a\u7f16\u8bd1\u62a5\u9519&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>1. \u57fa\u7840\u793a\u4f8b&#xff1a;\u5b9e\u73b0\u4e0d\u540c\u53c2\u6570\u7c7b\u578b\u7684\u52a0\u6cd5\u51fd\u6570<\/h4>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;iostream&gt;<\/span><\/span><br \/>\n<span class=\"token keyword\">using<\/span> <span class=\"token keyword\">namespace<\/span> std<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ 1. \u4e24\u4e2aint\u7c7b\u578b\u76f8\u52a0<\/span><br \/>\n<span class=\"token keyword\">int<\/span> <span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> a<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> b<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;int\u7c7b\u578b\u52a0\u6cd5&#xff1a;&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> a <span class=\"token operator\">&#043;<\/span> b<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">\/\/ 2. \u4e24\u4e2afloat\u7c7b\u578b\u76f8\u52a0&#xff08;\u53c2\u6570\u7c7b\u578b\u4e0d\u540c&#xff0c;\u6784\u6210\u91cd\u8f7d&#xff09;<\/span><br \/>\n<span class=\"token keyword\">float<\/span> <span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">float<\/span> a<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">float<\/span> b<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;float\u7c7b\u578b\u52a0\u6cd5&#xff1a;&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> a <span class=\"token operator\">&#043;<\/span> b<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">\/\/ 3. \u4e09\u4e2aint\u7c7b\u578b\u76f8\u52a0&#xff08;\u53c2\u6570\u4e2a\u6570\u4e0d\u540c&#xff0c;\u6784\u6210\u91cd\u8f7d&#xff09;<\/span><br \/>\n<span class=\"token keyword\">int<\/span> <span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> a<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> b<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> c<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;\u4e09\u4e2aint\u7c7b\u578b\u52a0\u6cd5&#xff1a;&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> a <span class=\"token operator\">&#043;<\/span> b <span class=\"token operator\">&#043;<\/span> c<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">\/\/ 4. int\u4e0efloat\u7c7b\u578b\u76f8\u52a0&#xff08;\u53c2\u6570\u987a\u5e8f\u4e0d\u540c&#xff0c;\u6784\u6210\u91cd\u8f7d&#xff09;<\/span><br \/>\n<span class=\"token keyword\">float<\/span> <span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> a<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">float<\/span> b<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;int&#043;float\u7c7b\u578b\u52a0\u6cd5&#xff1a;&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> a <span class=\"token operator\">&#043;<\/span> b<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token keyword\">int<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">20<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&lt;&lt;<\/span> endl<span class=\"token punctuation\">;<\/span>         <span class=\"token comment\">\/\/ \u5339\u914dint add(int, int)<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">3.5f<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">4.2f<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&lt;&lt;<\/span> endl<span class=\"token punctuation\">;<\/span>     <span class=\"token comment\">\/\/ \u5339\u914dfloat add(float, float)<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">3<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&lt;&lt;<\/span> endl<span class=\"token punctuation\">;<\/span>        <span class=\"token comment\">\/\/ \u5339\u914dint add(int, int, int)<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">5<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2.8f<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&lt;&lt;<\/span> endl<span class=\"token punctuation\">;<\/span>        <span class=\"token comment\">\/\/ \u5339\u914dfloat add(int, float)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h4>2. \u9519\u8bef\u793a\u4f8b&#xff1a;\u4ec5\u8fd4\u56de\u503c\u4e0d\u540c&#xff0c;\u4e0d\u6784\u6210\u91cd\u8f7d<\/h4>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;iostream&gt;<\/span><\/span><br \/>\n<span class=\"token keyword\">using<\/span> <span class=\"token keyword\">namespace<\/span> std<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u6b63\u786e\u51fd\u6570<\/span><br \/>\n<span class=\"token keyword\">int<\/span> <span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> a<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> b<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> a <span class=\"token operator\">&#043;<\/span> b<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u9519\u8bef&#xff1a;\u4ec5\u8fd4\u56de\u503c\u4e0d\u540c&#xff0c;\u53c2\u6570\u5217\u8868\u4e00\u81f4&#xff0c;\u4e0d\u6784\u6210\u91cd\u8f7d&#xff0c;\u7f16\u8bd1\u62a5\u9519<\/span><br \/>\n<span class=\"token keyword\">float<\/span> <span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> a<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> b<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">float<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">(<\/span>a <span class=\"token operator\">&#043;<\/span> b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u7f16\u8bd1\u65f6\u4f1a\u63d0\u793a\u201c\u91cd\u5b9a\u4e49\u201d\u9519\u8bef&#xff0c;\u56e0\u4e3a\u7f16\u8bd1\u5668\u65e0\u6cd5\u901a\u8fc7\u8fd4\u56de\u503c\u7c7b\u578b\u533a\u5206\u4e24\u4e2a\u540c\u540d\u51fd\u6570\u2014\u2014\u8c03\u7528\u65f6\u65e0\u6cd5\u786e\u5b9a\u5e94\u8fd4\u56de int \u8fd8\u662f float \u7c7b\u578b\u3002<\/p>\n<h3>\u4e8c\u3001\u51fd\u6570\u91cd\u8f7d\u7684\u4f7f\u7528\u89c4\u5219&#xff1a;\u53c2\u6570\u5dee\u5f02\u7684\u5224\u5b9a\u6807\u51c6<\/h3>\n<p>\u51fd\u6570\u91cd\u8f7d\u7684\u6838\u5fc3\u662f\u201c\u53c2\u6570\u5217\u8868\u4e0d\u540c\u201d&#xff0c;\u9700\u660e\u786e\u54ea\u4e9b\u60c5\u51b5\u5c5e\u4e8e\u6709\u6548\u5dee\u5f02&#xff0c;\u54ea\u4e9b\u60c5\u51b5\u4e0d\u6784\u6210\u5dee\u5f02&#xff0c;\u907f\u514d\u7f16\u5199\u65e0\u6548\u91cd\u8f7d\u4ee3\u7801\u3002<\/p>\n<h4>1. \u6709\u6548\u53c2\u6570\u5dee\u5f02&#xff08;\u6784\u6210\u91cd\u8f7d&#xff09;<\/h4>\n<ul>\n<li>\n<p>\u53c2\u6570\u4e2a\u6570\u4e0d\u540c&#xff1a;\u5982 add(int a, int b) \u4e0e add(int a, int b, int c)&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u53c2\u6570\u7c7b\u578b\u4e0d\u540c&#xff1a;\u5982 add(int a, int b) \u4e0e add(float a, float b)\u3001add(char a, int b)&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u53c2\u6570\u987a\u5e8f\u4e0d\u540c&#xff08;\u4e0d\u540c\u7c7b\u578b\u53c2\u6570&#xff09;&#xff1a;\u5982 add(int a, float b) \u4e0e add(float a, int b)&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u53c2\u6570\u4e3a\u6307\u9488\/\u5f15\u7528&#xff0c;\u7c7b\u578b\u4e0d\u540c&#xff1a;\u5982 func(int* p) \u4e0e func(float* p)\u3001func(int&amp; ref) \u4e0e func(float&amp; ref)&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u9ed8\u8ba4\u53c2\u6570\u5dee\u5f02&#xff08;\u9700\u907f\u514d\u4e8c\u4e49\u6027&#xff09;&#xff1a;\u5982 add(int a, int b&#061;10) \u4e0e add(int a)&#xff08;\u9700\u6ce8\u610f\u8c03\u7528\u65f6\u7684\u4e8c\u4e49\u6027\u95ee\u9898&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>2. \u65e0\u6548\u53c2\u6570\u5dee\u5f02&#xff08;\u4e0d\u6784\u6210\u91cd\u8f7d&#xff09;<\/h4>\n<ul>\n<li>\n<p>\u4ec5\u8fd4\u56de\u503c\u7c7b\u578b\u4e0d\u540c&#xff1a;\u5982\u524d\u6587\u9519\u8bef\u793a\u4f8b&#xff0c;\u7f16\u8bd1\u5668\u65e0\u6cd5\u533a\u5206&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4ec5\u53c2\u6570\u540d\u4e0d\u540c&#xff1a;\u5982 add(int a, int b) \u4e0e add(int x, int y)&#xff0c;\u53c2\u6570\u540d\u4ec5\u4e3a\u5c40\u90e8\u6807\u8bc6&#xff0c;\u4e0d\u5f71\u54cd\u51fd\u6570\u533a\u5206&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u53c2\u6570\u4e3a\u5f15\u7528\/\u6307\u9488&#xff0c;\u4f46\u6307\u5411\u7684\u7c7b\u578b\u76f8\u540c&#xff1a;\u5982 func(int&amp; ref) \u4e0e func(int* p) \u662f\u4e0d\u540c\u7c7b\u578b&#xff08;\u5f15\u7528 vs \u6307\u9488&#xff09;&#xff0c;\u6784\u6210\u91cd\u8f7d&#xff1b;\u4f46 func(int&amp; ref) \u4e0e func(const int&amp; ref) \u662f\u4e0d\u540c\u7c7b\u578b&#xff08;\u666e\u901a\u5f15\u7528 vs const \u5f15\u7528&#xff09;&#xff0c;\u4e5f\u6784\u6210\u91cd\u8f7d&#xff0c;\u9700\u6ce8\u610f&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u9ed8\u8ba4\u53c2\u6570\u5bfc\u81f4\u7684\u4e8c\u4e49\u6027&#xff1a;\u5982 add(int a, int b&#061;10) \u4e0e add(int a)&#xff0c;\u8c03\u7528 add(5) \u65f6&#xff0c;\u7f16\u8bd1\u5668\u65e0\u6cd5\u786e\u5b9a\u662f\u8c03\u7528\u5355\u53c2\u6570\u51fd\u6570&#xff0c;\u8fd8\u662f\u53cc\u53c2\u6570\u51fd\u6570\u5e76\u4f7f\u7528\u9ed8\u8ba4\u503c b&#061;10&#xff0c;\u5bfc\u81f4\u7f16\u8bd1\u62a5\u9519\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>3. \u4e8c\u4e49\u6027\u95ee\u9898&#xff1a;\u91cd\u8f7d\u8c03\u7528\u7684\u6a21\u7cca\u5339\u914d<\/h4>\n<p>\u5f53\u8c03\u7528\u91cd\u8f7d\u51fd\u6570\u65f6&#xff0c;\u82e5\u4f20\u5165\u7684\u5b9e\u53c2\u65e0\u6cd5\u552f\u4e00\u5339\u914d\u67d0\u4e2a\u51fd\u6570&#xff0c;\u4f1a\u51fa\u73b0\u201c\u4e8c\u4e49\u6027\u201d\u9519\u8bef&#xff0c;\u7f16\u8bd1\u5668\u65e0\u6cd5\u786e\u5b9a\u5e94\u8c03\u7528\u54ea\u4e2a\u7248\u672c\u3002<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;iostream&gt;<\/span><\/span><br \/>\n<span class=\"token keyword\">using<\/span> <span class=\"token keyword\">namespace<\/span> std<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u91cd\u8f7d\u51fd\u6570<\/span><br \/>\n<span class=\"token keyword\">void<\/span> <span class=\"token function\">func<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> a<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">float<\/span> b<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;int &#043; float&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> endl<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token function\">func<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">float<\/span> a<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> b<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;float &#043; int&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> endl<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token keyword\">int<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u4e8c\u4e49\u6027\u9519\u8bef&#xff1a;\u5b9e\u53c2\u4e3a(3.5, 2.8)&#xff0c;\u5747\u4e3afloat&#xff0c;\u65e0\u6cd5\u5339\u914d\u4efb\u4e00\u7248\u672c<\/span><br \/>\n    <span class=\"token function\">func<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">3.5f<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2.8f<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u89c4\u907f\u65b9\u6848&#xff1a;\u8c03\u6574\u5b9e\u53c2\u7c7b\u578b&#xff08;\u5982 func(3, 2.8f)&#xff09;&#xff0c;\u6216\u8865\u5145\u5bf9\u5e94\u7684\u91cd\u8f7d\u7248\u672c&#xff08;\u5982 func(float a, float b)&#xff09;&#xff0c;\u6d88\u9664\u6a21\u7cca\u5339\u914d\u3002<\/p>\n<h3>\u4e09\u3001\u51fd\u6570\u91cd\u8f7d\u7684\u5b9e\u73b0\u539f\u7406&#xff1a;\u540d\u5b57\u4fee\u9970&#xff08;Name Mangling&#xff09;<\/h3>\n<p>C \u8bed\u8a00\u4e0d\u652f\u6301\u51fd\u6570\u91cd\u8f7d&#xff0c;\u800c C&#043;&#043; \u652f\u6301&#xff0c;\u6838\u5fc3\u539f\u56e0\u662f\u7f16\u8bd1\u5668\u5bf9\u51fd\u6570\u540d\u7684\u5904\u7406\u65b9\u5f0f\u4e0d\u540c\u2014\u2014C&#043;&#043; \u4f1a\u901a\u8fc7\u201c\u540d\u5b57\u4fee\u9970\u201d\u673a\u5236&#xff0c;\u5c06\u51fd\u6570\u540d\u4e0e\u53c2\u6570\u5217\u8868\u4fe1\u606f\u7ed3\u5408&#xff0c;\u751f\u6210\u552f\u4e00\u7684\u5185\u90e8\u51fd\u6570\u540d&#xff0c;\u4ece\u800c\u533a\u5206\u540c\u540d\u4f46\u53c2\u6570\u4e0d\u540c\u7684\u51fd\u6570\u3002<\/p>\n<h4>1. C \u8bed\u8a00\u4e0e C&#043;&#043; \u51fd\u6570\u540d\u5904\u7406\u5dee\u5f02<\/h4>\n<ul>\n<li>\n<p>C \u8bed\u8a00&#xff1a;\u7f16\u8bd1\u5668\u76f4\u63a5\u4f7f\u7528\u51fd\u6570\u540d\u4f5c\u4e3a\u5185\u90e8\u6807\u8bc6&#xff0c;\u82e5\u5b58\u5728\u540c\u540d\u51fd\u6570&#xff0c;\u4f1a\u63d0\u793a\u91cd\u5b9a\u4e49\u9519\u8bef&#xff0c;\u65e0\u6cd5\u533a\u5206&#xff1b;<\/p>\n<\/li>\n<li>\n<p>C&#043;&#043; \u8bed\u8a00&#xff1a;\u7f16\u8bd1\u5668\u4f1a\u5bf9\u51fd\u6570\u540d\u8fdb\u884c\u4fee\u9970&#xff0c;\u5c06\u53c2\u6570\u7c7b\u578b\u3001\u4e2a\u6570\u7b49\u4fe1\u606f\u7f16\u7801\u5230\u5185\u90e8\u51fd\u6570\u540d\u4e2d&#xff0c;\u786e\u4fdd\u6bcf\u4e2a\u91cd\u8f7d\u51fd\u6570\u7684\u5185\u90e8\u6807\u8bc6\u552f\u4e00\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>2. \u540d\u5b57\u4fee\u9970\u7684\u7b80\u5316\u793a\u4f8b<\/h4>\n<p>\u540d\u5b57\u4fee\u9970\u7684\u5177\u4f53\u89c4\u5219\u56e0\u7f16\u8bd1\u5668&#xff08;GCC\u3001Clang\u3001MSVC&#xff09;\u800c\u5f02&#xff0c;\u4ee5\u4e0b\u4e3a\u7b80\u5316\u903b\u8f91&#xff0c;\u5e2e\u52a9\u7406\u89e3&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u51fd\u6570 int add(int a, int b) \u53ef\u80fd\u88ab\u4fee\u9970\u4e3a _Z3addii&#xff08;Z \u4e3a\u6807\u8bc6&#xff0c;3 \u4e3a\u51fd\u6570\u540d\u957f\u5ea6&#xff0c;ii \u8868\u793a\u4e24\u4e2a int \u53c2\u6570&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u51fd\u6570 float add(float a, float b) \u53ef\u80fd\u88ab\u4fee\u9970\u4e3a _Z3addff&#xff08;ff \u8868\u793a\u4e24\u4e2a float \u53c2\u6570&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u51fd\u6570 int add(int a, int b, int c) \u53ef\u80fd\u88ab\u4fee\u9970\u4e3a _Z3addiii&#xff08;iii \u8868\u793a\u4e09\u4e2a int \u53c2\u6570&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u7f16\u8bd1\u540e&#xff0c;\u6bcf\u4e2a\u91cd\u8f7d\u51fd\u6570\u7684\u5185\u90e8\u540d\u79f0\u4e0d\u540c&#xff0c;\u94fe\u63a5\u5668\u53ef\u51c6\u786e\u627e\u5230\u5bf9\u5e94\u7684\u51fd\u6570\u5b9e\u73b0&#xff0c;\u4ece\u800c\u652f\u6301\u91cd\u8f7d\u8c03\u7528\u3002<\/p>\n<h4>3. \u5982\u4f55\u9a8c\u8bc1\u540d\u5b57\u4fee\u9970&#xff1f;<\/h4>\n<p>\u53ef\u901a\u8fc7\u7f16\u8bd1\u5668\u751f\u6210\u7684\u76ee\u6807\u6587\u4ef6&#xff08;.o \u6587\u4ef6&#xff09;\u6216\u6c47\u7f16\u4ee3\u7801&#xff0c;\u67e5\u770b\u4fee\u9970\u540e\u7684\u51fd\u6570\u540d\u3002\u4f8b\u5982&#xff0c;\u4f7f\u7528 GCC \u7f16\u8bd1\u5668&#xff0c;\u901a\u8fc7\u547d\u4ee4 g&#043;&#043; -S test.cpp \u751f\u6210\u6c47\u7f16\u4ee3\u7801&#xff0c;\u53ef\u770b\u5230\u91cd\u8f7d\u51fd\u6570\u7684\u5185\u90e8\u540d\u79f0\u5dee\u5f02\u3002<\/p>\n<h3>\u56db\u3001\u51fd\u6570\u91cd\u8f7d\u4e0e\u5176\u4ed6\u7279\u6027\u7684\u7ed3\u5408\u4f7f\u7528<\/h3>\n<h4>1. \u91cd\u8f7d\u4e0e\u9ed8\u8ba4\u53c2\u6570\u7684\u7ed3\u5408<\/h4>\n<p>\u91cd\u8f7d\u4e0e\u9ed8\u8ba4\u53c2\u6570\u53ef\u7ed3\u5408\u4f7f\u7528&#xff0c;\u4f46\u9700\u907f\u514d\u4e8c\u4e49\u6027\u3002\u4f8b\u5982&#xff1a;<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;iostream&gt;<\/span><\/span><br \/>\n<span class=\"token keyword\">using<\/span> <span class=\"token keyword\">namespace<\/span> std<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u5355\u53c2\u6570\u51fd\u6570<\/span><br \/>\n<span class=\"token keyword\">void<\/span> <span class=\"token function\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> a<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;\u6574\u6570&#xff1a;&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> a <span class=\"token operator\">&lt;&lt;<\/span> endl<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u53cc\u53c2\u6570\u51fd\u6570&#xff0c;\u7b2c\u4e8c\u4e2a\u53c2\u6570\u6709\u9ed8\u8ba4\u503c<\/span><br \/>\n<span class=\"token keyword\">void<\/span> <span class=\"token function\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> a<span class=\"token punctuation\">,<\/span> string msg <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;\u65e0\u5907\u6ce8&#034;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;\u6574\u6570&#xff1a;&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> a <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;&#xff0c;\u5907\u6ce8&#xff1a;&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> msg <span class=\"token operator\">&lt;&lt;<\/span> endl<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token keyword\">int<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token function\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u4e8c\u4e49\u6027\u9519\u8bef&#xff1a;\u65e0\u6cd5\u786e\u5b9a\u8c03\u7528\u54ea\u4e2a\u7248\u672c<\/span><br \/>\n    <span class=\"token function\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u6d4b\u8bd5&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u6b63\u5e38\u5339\u914d\u53cc\u53c2\u6570\u7248\u672c<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u89c4\u907f\u65b9\u6848&#xff1a;\u79fb\u9664\u9ed8\u8ba4\u53c2\u6570&#xff0c;\u6216\u8c03\u6574\u53c2\u6570\u7c7b\u578b&#xff0c;\u6d88\u9664\u8c03\u7528\u65f6\u7684\u6a21\u7cca\u6027\u3002<\/p>\n<h4>2. \u91cd\u8f7d\u4e0e\u5f15\u7528\/\u6307\u9488\u7684\u7ed3\u5408<\/h4>\n<p>\u5f15\u7528\u548c\u6307\u9488\u7684\u7c7b\u578b\u5dee\u5f02\u53ef\u6784\u6210\u91cd\u8f7d&#xff0c;\u4e14 const \u4fee\u9970\u7684\u5f15\u7528\/\u6307\u9488\u4e0e\u666e\u901a\u5f15\u7528\/\u6307\u9488\u4e5f\u53ef\u6784\u6210\u91cd\u8f7d&#xff1a;<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;iostream&gt;<\/span><\/span><br \/>\n<span class=\"token keyword\">using<\/span> <span class=\"token keyword\">namespace<\/span> std<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u666e\u901a\u5f15\u7528<\/span><br \/>\n<span class=\"token keyword\">void<\/span> <span class=\"token function\">func<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span><span class=\"token operator\">&amp;<\/span> ref<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;\u666e\u901a\u5f15\u7528&#xff1a;&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> ref <span class=\"token operator\">&lt;&lt;<\/span> endl<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">\/\/ const\u5f15\u7528&#xff08;\u6784\u6210\u91cd\u8f7d&#xff09;<\/span><br \/>\n<span class=\"token keyword\">void<\/span> <span class=\"token function\">func<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">const<\/span> <span class=\"token keyword\">int<\/span><span class=\"token operator\">&amp;<\/span> ref<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;const\u5f15\u7528&#xff1a;&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> ref <span class=\"token operator\">&lt;&lt;<\/span> endl<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u6307\u9488&#xff08;\u6784\u6210\u91cd\u8f7d&#xff09;<\/span><br \/>\n<span class=\"token keyword\">void<\/span> <span class=\"token function\">func<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span><span class=\"token operator\">*<\/span> p<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;\u6307\u9488&#xff1a;&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token operator\">*<\/span>p <span class=\"token operator\">&lt;&lt;<\/span> endl<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token keyword\">int<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">int<\/span> a <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">const<\/span> <span class=\"token keyword\">int<\/span> b <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">20<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token function\">func<\/span><span class=\"token punctuation\">(<\/span>a<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>       <span class=\"token comment\">\/\/ \u5339\u914d\u666e\u901a\u5f15\u7528<\/span><br \/>\n    <span class=\"token function\">func<\/span><span class=\"token punctuation\">(<\/span>b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>       <span class=\"token comment\">\/\/ \u5339\u914dconst\u5f15\u7528&#xff08;\u5e38\u91cf\u53ea\u80fd\u7ed1\u5b9aconst\u5f15\u7528&#xff09;<\/span><br \/>\n    <span class=\"token function\">func<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&amp;<\/span>a<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>      <span class=\"token comment\">\/\/ \u5339\u914d\u6307\u9488<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h4>3. \u91cd\u8f7d\u4e0e\u7c7b\u6210\u5458\u51fd\u6570\u7684\u7ed3\u5408<\/h4>\n<p>\u7c7b\u7684\u6210\u5458\u51fd\u6570\u4e5f\u652f\u6301\u91cd\u8f7d&#xff0c;\u4e14\u6210\u5458\u51fd\u6570\u7684 const \u4fee\u9970\u7b26\u53ef\u4f5c\u4e3a\u91cd\u8f7d\u4f9d\u636e&#xff08;const \u6210\u5458\u51fd\u6570\u4e0e\u975e const \u6210\u5458\u51fd\u6570\u6784\u6210\u91cd\u8f7d&#xff09;&#xff1a;<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;iostream&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;string&gt;<\/span><\/span><br \/>\n<span class=\"token keyword\">using<\/span> <span class=\"token keyword\">namespace<\/span> std<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Person<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">public<\/span><span class=\"token operator\">:<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u975econst\u6210\u5458\u51fd\u6570<\/span><br \/>\n    <span class=\"token keyword\">void<\/span> <span class=\"token function\">showInfo<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;\u975econst\u6210\u5458\u51fd\u6570&#xff1a;&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> name <span class=\"token operator\">&lt;&lt;<\/span> endl<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ const\u6210\u5458\u51fd\u6570&#xff08;\u6784\u6210\u91cd\u8f7d&#xff09;<\/span><br \/>\n    <span class=\"token keyword\">void<\/span> <span class=\"token function\">showInfo<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">const<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;const\u6210\u5458\u51fd\u6570&#xff1a;&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> name <span class=\"token operator\">&lt;&lt;<\/span> endl<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token keyword\">private<\/span><span class=\"token operator\">:<\/span><br \/>\n    string name <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;\u5f20\u4e09&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">int<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    Person p1<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">const<\/span> Person p2<span class=\"token punctuation\">;<\/span><\/p>\n<p>    p1<span class=\"token punctuation\">.<\/span><span class=\"token function\">showInfo<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u5339\u914d\u975econst\u6210\u5458\u51fd\u6570<\/span><br \/>\n    p2<span class=\"token punctuation\">.<\/span><span class=\"token function\">showInfo<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u5339\u914dconst\u6210\u5458\u51fd\u6570&#xff08;const\u5bf9\u8c61\u53ea\u80fd\u8c03\u7528const\u6210\u5458\u51fd\u6570&#xff09;<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h3>\u4e94\u3001\u51fd\u6570\u91cd\u8f7d\u7684\u9002\u7528\u573a\u666f\u4e0e\u4f18\u52bf<\/h3>\n<h4>1. \u6838\u5fc3\u9002\u7528\u573a\u666f<\/h4>\n<ul>\n<li>\n<p>\u529f\u80fd\u76f8\u4f3c\u4f46\u53c2\u6570\u4e0d\u540c&#xff1a;\u5982\u52a0\u6cd5\u3001\u51cf\u6cd5\u51fd\u6570&#xff0c;\u652f\u6301\u4e0d\u540c\u7c7b\u578b&#xff08;int\u3001float\u3001double&#xff09;\u3001\u4e0d\u540c\u4e2a\u6570\u7684\u53c2\u6570&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u7b80\u5316\u51fd\u6570\u540d&#xff1a;\u907f\u514d\u4e3a\u76f8\u4f3c\u529f\u80fd\u5b9a\u4e49\u591a\u4e2a\u4e0d\u540c\u540d\u79f0\u7684\u51fd\u6570&#xff08;\u5982 addInt\u3001addFloat&#xff09;&#xff0c;\u964d\u4f4e\u8bb0\u5fc6\u6210\u672c&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u63a5\u53e3\u7edf\u4e00&#xff1a;\u4e3a\u7528\u6237\u63d0\u4f9b\u4e00\u81f4\u7684\u51fd\u6570\u540d&#xff0c;\u5c4f\u853d\u53c2\u6570\u5dee\u5f02&#xff0c;\u63d0\u5347\u4ee3\u7801\u53ef\u8bfb\u6027\u4e0e\u6613\u7528\u6027&#xff08;\u5982 C&#043;&#043; \u6807\u51c6\u5e93\u4e2d\u7684 cout &lt;&lt; \u8fd0\u7b97\u7b26&#xff0c;\u652f\u6301\u591a\u79cd\u7c7b\u578b\u8f93\u51fa&#xff0c;\u672c\u8d28\u662f\u91cd\u8f7d&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>2. \u6838\u5fc3\u4f18\u52bf<\/h4>\n<ul>\n<li>\n<p>\u4ee3\u7801\u7b80\u6d01&#xff1a;\u540c\u540d\u51fd\u6570\u7edf\u4e00\u529f\u80fd\u6807\u8bc6&#xff0c;\u51cf\u5c11\u5197\u4f59\u51fd\u6570\u540d&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u6613\u7528\u6027\u5f3a&#xff1a;\u8c03\u7528\u65f6\u65e0\u9700\u8bb0\u5fc6\u4e0d\u540c\u51fd\u6570\u540d&#xff0c;\u7f16\u8bd1\u5668\u81ea\u52a8\u5339\u914d&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u53ef\u6269\u5c55\u6027\u597d&#xff1a;\u540e\u7eed\u65b0\u589e\u53c2\u6570\u7c7b\u578b\u7684\u529f\u80fd\u65f6&#xff0c;\u53ea\u9700\u8865\u5145\u91cd\u8f7d\u7248\u672c&#xff0c;\u65e0\u9700\u4fee\u6539\u539f\u6709\u4ee3\u7801&#xff0c;\u7b26\u5408\u201c\u5f00\u95ed\u539f\u5219\u201d\u3002<\/p>\n<\/li>\n<\/ul>\n<h3>\u516d\u3001\u907f\u5751\u6307\u5357&#xff1a;\u5e38\u89c1\u9519\u8bef\u4e0e\u89c4\u907f\u65b9\u6cd5<\/h3>\n<h4>1. \u4ec5\u8fd4\u56de\u503c\u4e0d\u540c\u5bfc\u81f4\u91cd\u8f7d\u65e0\u6548<\/h4>\n<p>\u9519\u8bef\u573a\u666f&#xff1a;\u8ba4\u4e3a\u8fd4\u56de\u503c\u4e0d\u540c\u5373\u53ef\u6784\u6210\u91cd\u8f7d&#xff0c;\u7f16\u5199\u540c\u540d\u3001\u540c\u53c2\u6570\u5217\u8868\u4f46\u4e0d\u540c\u8fd4\u56de\u503c\u7684\u51fd\u6570\u3002<\/p>\n<p>\u89c4\u907f\u65b9\u6848&#xff1a;\u660e\u786e\u91cd\u8f7d\u7684\u6838\u5fc3\u662f\u53c2\u6570\u5217\u8868\u4e0d\u540c&#xff0c;\u82e5\u9700\u533a\u5206\u8fd4\u56de\u503c&#xff0c;\u9700\u901a\u8fc7\u53c2\u6570\u5dee\u5f02\u5b9e\u73b0\u3002<\/p>\n<h4>2. \u9ed8\u8ba4\u53c2\u6570\u5f15\u53d1\u4e8c\u4e49\u6027<\/h4>\n<p>\u9519\u8bef\u573a\u666f&#xff1a;\u91cd\u8f7d\u51fd\u6570\u4e0e\u9ed8\u8ba4\u53c2\u6570\u7ec4\u5408&#xff0c;\u5bfc\u81f4\u8c03\u7528\u65f6\u65e0\u6cd5\u552f\u4e00\u5339\u914d\u3002<\/p>\n<p>\u89c4\u907f\u65b9\u6848&#xff1a;\u5408\u7406\u8bbe\u8ba1\u53c2\u6570\u5217\u8868&#xff0c;\u907f\u514d\u9ed8\u8ba4\u53c2\u6570\u4e0e\u91cd\u8f7d\u51fd\u6570\u7684\u53c2\u6570\u4e2a\u6570\u91cd\u53e0&#xff1b;\u5fc5\u8981\u65f6\u79fb\u9664\u9ed8\u8ba4\u53c2\u6570&#xff0c;\u6216\u8865\u5145\u660e\u786e\u7684\u91cd\u8f7d\u7248\u672c\u3002<\/p>\n<h4>3. \u5ffd\u7565 const \u4fee\u9970\u7b26\u7684\u91cd\u8f7d\u4f5c\u7528<\/h4>\n<p>\u9519\u8bef\u573a\u666f&#xff1a;\u8ba4\u4e3a const \u4fee\u9970\u7684\u5f15\u7528\/\u6307\u9488\u4e0e\u666e\u901a\u5f15\u7528\/\u6307\u9488\u65e0\u6cd5\u6784\u6210\u91cd\u8f7d&#xff0c;\u6216\u4e0d\u77e5\u9053 const \u6210\u5458\u51fd\u6570\u53ef\u4e0e\u975e const \u6210\u5458\u51fd\u6570\u91cd\u8f7d\u3002<\/p>\n<p>\u89c4\u907f\u65b9\u6848&#xff1a;\u638c\u63e1 const \u4fee\u9970\u7b26\u5728\u91cd\u8f7d\u4e2d\u7684\u4f5c\u7528&#xff0c;\u5408\u7406\u5229\u7528\u5176\u5b9e\u73b0\u66f4\u7cbe\u7ec6\u7684\u51fd\u6570\u533a\u5206\u3002<\/p>\n<h4>4. \u8de8\u4f5c\u7528\u57df\u7684\u51fd\u6570\u4e0d\u6784\u6210\u91cd\u8f7d<\/h4>\n<p>\u9519\u8bef\u573a\u666f&#xff1a;\u5728\u4e0d\u540c\u4f5c\u7528\u57df&#xff08;\u5982\u5168\u5c40\u4f5c\u7528\u57df\u4e0e\u5c40\u90e8\u4f5c\u7528\u57df&#xff09;\u5b9a\u4e49\u540c\u540d\u51fd\u6570&#xff0c;\u8ba4\u4e3a\u662f\u91cd\u8f7d\u3002<\/p>\n<p>\u89c4\u907f\u65b9\u6848&#xff1a;\u51fd\u6570\u91cd\u8f7d\u4ec5\u9002\u7528\u4e8e\u540c\u4e00\u4f5c\u7528\u57df&#xff0c;\u4e0d\u540c\u4f5c\u7528\u57df\u7684\u540c\u540d\u51fd\u6570\u5c5e\u4e8e\u201c\u9690\u85cf\u201d&#xff08;\u5c40\u90e8\u51fd\u6570\u9690\u85cf\u5168\u5c40\u51fd\u6570&#xff09;&#xff0c;\u800c\u975e\u91cd\u8f7d\u3002<\/p>\n<h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<p>\u51fd\u6570\u91cd\u8f7d\u662f C&#043;&#043; \u7b80\u5316\u4ee3\u7801\u3001\u7edf\u4e00\u63a5\u53e3\u7684\u6838\u5fc3\u7279\u6027&#xff0c;\u5176\u672c\u8d28\u662f\u901a\u8fc7\u201c\u540d\u5b57\u4fee\u9970\u201d\u673a\u5236&#xff0c;\u5c06\u540c\u540d\u51fd\u6570\u4e0e\u53c2\u6570\u5217\u8868\u7ed3\u5408&#xff0c;\u751f\u6210\u552f\u4e00\u5185\u90e8\u6807\u8bc6&#xff0c;\u5b9e\u73b0\u5dee\u5f02\u5316\u8c03\u7528\u3002\u638c\u63e1\u51fd\u6570\u91cd\u8f7d\u7684\u5173\u952e&#xff0c;\u5728\u4e8e\u660e\u786e\u201c\u53c2\u6570\u5217\u8868\u4e0d\u540c\u201d\u7684\u5224\u5b9a\u6807\u51c6&#xff0c;\u89c4\u907f\u4e8c\u4e49\u6027\u95ee\u9898&#xff0c;\u540c\u65f6\u7406\u89e3\u5176\u4e0e\u9ed8\u8ba4\u53c2\u6570\u3001\u5f15\u7528\u3001\u7c7b\u6210\u5458\u51fd\u6570\u7b49\u7279\u6027\u7684\u7ed3\u5408\u7528\u6cd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u51fd\u6570\u91cd\u8f7d&#xff1a;C \u4e2d\u540c\u540d\u51fd\u6570\u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u4f7f\u7528<br \/>\n\u5728 C \u7f16\u7a0b\u4e2d&#xff0c;\u51fd\u6570\u4f5c\u4e3a\u6a21\u5757\u5316\u6838\u5fc3&#xff0c;\u5e38\u5e38\u9700\u8981\u5b9e\u73b0\u201c\u529f\u80fd\u76f8\u4f3c\u4f46\u53c2\u6570\u4e0d\u540c\u201d\u7684\u903b\u8f91\u2014\u2014\u6bd4\u5982\u8ba1\u7b97\u4e24\u4e2a\u6574\u6570\u7684\u548c\u3001\u4e24\u4e2a\u6d6e\u70b9\u6570\u7684\u548c&#xff0c;\u82e5\u4e3a\u6bcf\u79cd\u573a\u666f\u5b9a\u4e49\u4e0d\u540c\u540d\u79f0\u7684\u51fd\u6570&#xff08;\u5982 addInt\u3001addFloat&#xff09;&#xff0c;\u4f1a\u5bfc\u81f4\u51fd\u6570\u540d\u5197\u4f59\u3001\u4ee3\u7801\u53ef\u8bfb\u6027\u4e0b\u964d\u3002\u800c\u51fd\u6570\u91cd\u8f7d&#xff08;Function Overloading&#xff09; \u5141\u8bb8\u5728\u540c\u4e00\u4f5c\u7528\u57df\u5185\u5b9a\u4e49\u591a\u4e2a\u540c\u540d\u51fd\u6570<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6679,6680,55,371,190,1813,427],"topic":[],"class_list":["post-63187","post","type-post","status-publish","format-standard","hentry","category-server","tag-6679","tag-6680","tag-c","tag-371","tag-190","tag-1813","tag-427"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u51fd\u6570\u91cd\u8f7d\uff1aC++ \u4e2d\u540c\u540d\u51fd\u6570\u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/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:\/\/www.wsisp.com\/helps\/63187.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u51fd\u6570\u91cd\u8f7d\uff1aC++ \u4e2d\u540c\u540d\u51fd\u6570\u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u51fd\u6570\u91cd\u8f7d&#xff1a;C \u4e2d\u540c\u540d\u51fd\u6570\u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u4f7f\u7528 \u5728 C \u7f16\u7a0b\u4e2d&#xff0c;\u51fd\u6570\u4f5c\u4e3a\u6a21\u5757\u5316\u6838\u5fc3&#xff0c;\u5e38\u5e38\u9700\u8981\u5b9e\u73b0\u201c\u529f\u80fd\u76f8\u4f3c\u4f46\u53c2\u6570\u4e0d\u540c\u201d\u7684\u903b\u8f91\u2014\u2014\u6bd4\u5982\u8ba1\u7b97\u4e24\u4e2a\u6574\u6570\u7684\u548c\u3001\u4e24\u4e2a\u6d6e\u70b9\u6570\u7684\u548c&#xff0c;\u82e5\u4e3a\u6bcf\u79cd\u573a\u666f\u5b9a\u4e49\u4e0d\u540c\u540d\u79f0\u7684\u51fd\u6570&#xff08;\u5982 addInt\u3001addFloat&#xff09;&#xff0c;\u4f1a\u5bfc\u81f4\u51fd\u6570\u540d\u5197\u4f59\u3001\u4ee3\u7801\u53ef\u8bfb\u6027\u4e0b\u964d\u3002\u800c\u51fd\u6570\u91cd\u8f7d&#xff08;Function Overloading&#xff09; \u5141\u8bb8\u5728\u540c\u4e00\u4f5c\u7528\u57df\u5185\u5b9a\u4e49\u591a\u4e2a\u540c\u540d\u51fd\u6570\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/63187.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-21T06:17:45+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/63187.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/63187.html\",\"name\":\"\u51fd\u6570\u91cd\u8f7d\uff1aC++ \u4e2d\u540c\u540d\u51fd\u6570\u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-21T06:17:45+00:00\",\"dateModified\":\"2026-01-21T06:17:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/63187.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/63187.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/63187.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u51fd\u6570\u91cd\u8f7d\uff1aC++ \u4e2d\u540c\u540d\u51fd\u6570\u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u4f7f\u7528\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u51fd\u6570\u91cd\u8f7d\uff1aC++ \u4e2d\u540c\u540d\u51fd\u6570\u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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:\/\/www.wsisp.com\/helps\/63187.html","og_locale":"zh_CN","og_type":"article","og_title":"\u51fd\u6570\u91cd\u8f7d\uff1aC++ \u4e2d\u540c\u540d\u51fd\u6570\u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u51fd\u6570\u91cd\u8f7d&#xff1a;C \u4e2d\u540c\u540d\u51fd\u6570\u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u4f7f\u7528 \u5728 C \u7f16\u7a0b\u4e2d&#xff0c;\u51fd\u6570\u4f5c\u4e3a\u6a21\u5757\u5316\u6838\u5fc3&#xff0c;\u5e38\u5e38\u9700\u8981\u5b9e\u73b0\u201c\u529f\u80fd\u76f8\u4f3c\u4f46\u53c2\u6570\u4e0d\u540c\u201d\u7684\u903b\u8f91\u2014\u2014\u6bd4\u5982\u8ba1\u7b97\u4e24\u4e2a\u6574\u6570\u7684\u548c\u3001\u4e24\u4e2a\u6d6e\u70b9\u6570\u7684\u548c&#xff0c;\u82e5\u4e3a\u6bcf\u79cd\u573a\u666f\u5b9a\u4e49\u4e0d\u540c\u540d\u79f0\u7684\u51fd\u6570&#xff08;\u5982 addInt\u3001addFloat&#xff09;&#xff0c;\u4f1a\u5bfc\u81f4\u51fd\u6570\u540d\u5197\u4f59\u3001\u4ee3\u7801\u53ef\u8bfb\u6027\u4e0b\u964d\u3002\u800c\u51fd\u6570\u91cd\u8f7d&#xff08;Function Overloading&#xff09; \u5141\u8bb8\u5728\u540c\u4e00\u4f5c\u7528\u57df\u5185\u5b9a\u4e49\u591a\u4e2a\u540c\u540d\u51fd\u6570","og_url":"https:\/\/www.wsisp.com\/helps\/63187.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-21T06:17:45+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/63187.html","url":"https:\/\/www.wsisp.com\/helps\/63187.html","name":"\u51fd\u6570\u91cd\u8f7d\uff1aC++ \u4e2d\u540c\u540d\u51fd\u6570\u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-21T06:17:45+00:00","dateModified":"2026-01-21T06:17:45+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/63187.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/63187.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/63187.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u51fd\u6570\u91cd\u8f7d\uff1aC++ \u4e2d\u540c\u540d\u51fd\u6570\u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u4f7f\u7528"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/63187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=63187"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/63187\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=63187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=63187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=63187"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=63187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}