{"id":3256,"date":"2025-03-28T00:05:39","date_gmt":"2025-03-27T16:05:39","guid":{"rendered":"https:\/\/www.laixuexila.com\/?p=3256"},"modified":"2025-03-28T00:05:39","modified_gmt":"2025-03-27T16:05:39","slug":"c-%e8%bf%90%e7%ae%97%e7%ac%a6%ef%bc%88operators-in-c%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.laixuexila.com\/index.php\/2025\/03\/28\/c-%e8%bf%90%e7%ae%97%e7%ac%a6%ef%bc%88operators-in-c%ef%bc%89\/","title":{"rendered":"C++ \u8fd0\u7b97\u7b26\uff08Operators in C++\uff09"},"content":{"rendered":"\n<p>C++ \u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u8fd0\u7b97\u7b26\uff0c\u7528\u4e8e\u8fdb\u884c\u5404\u79cd\u8fd0\u7b97\u548c\u64cd\u4f5c\u3002\u8fd0\u7b97\u7b26\u662f\u6267\u884c\u64cd\u4f5c\u7684\u7b26\u53f7\uff0c\u7528\u6765\u5904\u7406\u6570\u636e\u5e76\u751f\u6210\u7ed3\u679c\u3002\u8fd0\u7b97\u7b26\u7684\u79cd\u7c7b\u7e41\u591a\uff0cC++ \u652f\u6301\u7b97\u672f\u8fd0\u7b97\u7b26\u3001\u5173\u7cfb\u8fd0\u7b97\u7b26\u3001\u903b\u8f91\u8fd0\u7b97\u7b26\u3001\u4f4d\u8fd0\u7b97\u7b26\u3001\u8d4b\u503c\u8fd0\u7b97\u7b26\u7b49\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. \u7b97\u672f\u8fd0\u7b97\u7b26\uff08Arithmetic Operators\uff09<\/strong><\/h2>\n\n\n\n<p>\u7b97\u672f\u8fd0\u7b97\u7b26\u7528\u4e8e\u57fa\u672c\u7684\u6570\u5b66\u8fd0\u7b97\uff0c\u5982\u52a0\u6cd5\u3001\u51cf\u6cd5\u3001\u4e58\u6cd5\u3001\u9664\u6cd5\u7b49\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8fd0\u7b97\u7b26<\/th><th>\u63cf\u8ff0<\/th><th>\u793a\u4f8b<\/th><\/tr><\/thead><tbody><tr><td><code>+<\/code><\/td><td>\u52a0\u6cd5<\/td><td><code>a + b<\/code><\/td><\/tr><tr><td><code>-<\/code><\/td><td>\u51cf\u6cd5<\/td><td><code>a - b<\/code><\/td><\/tr><tr><td><code>*<\/code><\/td><td>\u4e58\u6cd5<\/td><td><code>a * b<\/code><\/td><\/tr><tr><td><code>\/<\/code><\/td><td>\u9664\u6cd5<\/td><td><code>a \/ b<\/code><\/td><\/tr><tr><td><code>%<\/code><\/td><td>\u53d6\u4f59<\/td><td><code>a % b<\/code><\/td><\/tr><tr><td><code>++<\/code><\/td><td>\u81ea\u589e<\/td><td><code>a++<\/code> \u6216 <code>++a<\/code><\/td><\/tr><tr><td><code>--<\/code><\/td><td>\u81ea\u51cf<\/td><td><code>a--<\/code> \u6216 <code>--a<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a\u4f7f\u7528\u7b97\u672f\u8fd0\u7b97\u7b26<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n    int a = 10, b = 5;\n    cout &lt;&lt; \"a + b = \" &lt;&lt; a + b &lt;&lt; endl; \/\/ 15\n    cout &lt;&lt; \"a - b = \" &lt;&lt; a - b &lt;&lt; endl; \/\/ 5\n    cout &lt;&lt; \"a * b = \" &lt;&lt; a * b &lt;&lt; endl; \/\/ 50\n    cout &lt;&lt; \"a \/ b = \" &lt;&lt; a \/ b &lt;&lt; endl; \/\/ 2\n    cout &lt;&lt; \"a % b = \" &lt;&lt; a % b &lt;&lt; endl; \/\/ 0\n    return 0;\n}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. \u5173\u7cfb\u8fd0\u7b97\u7b26\uff08Relational Operators\uff09<\/strong><\/h2>\n\n\n\n<p>\u5173\u7cfb\u8fd0\u7b97\u7b26\u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u503c\u7684\u5173\u7cfb\uff0c\u8fd4\u56de\u5e03\u5c14\u503c <code>true<\/code> \u6216 <code>false<\/code>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8fd0\u7b97\u7b26<\/th><th>\u63cf\u8ff0<\/th><th>\u793a\u4f8b<\/th><\/tr><\/thead><tbody><tr><td><code>==<\/code><\/td><td>\u7b49\u4e8e<\/td><td><code>a == b<\/code><\/td><\/tr><tr><td><code>!=<\/code><\/td><td>\u4e0d\u7b49\u4e8e<\/td><td><code>a != b<\/code><\/td><\/tr><tr><td><code>&gt;<\/code><\/td><td>\u5927\u4e8e<\/td><td><code>a &gt; b<\/code><\/td><\/tr><tr><td><code>&lt;<\/code><\/td><td>\u5c0f\u4e8e<\/td><td><code>a &lt; b<\/code><\/td><\/tr><tr><td><code>&gt;=<\/code><\/td><td>\u5927\u4e8e\u6216\u7b49\u4e8e<\/td><td><code>a &gt;= b<\/code><\/td><\/tr><tr><td><code>&lt;=<\/code><\/td><td>\u5c0f\u4e8e\u6216\u7b49\u4e8e<\/td><td><code>a &lt;= b<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a\u4f7f\u7528\u5173\u7cfb\u8fd0\u7b97\u7b26<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n    int a = 10, b = 5;\n    cout &lt;&lt; \"a == b: \" &lt;&lt; (a == b) &lt;&lt; endl; \/\/ 0 (false)\n    cout &lt;&lt; \"a != b: \" &lt;&lt; (a != b) &lt;&lt; endl; \/\/ 1 (true)\n    cout &lt;&lt; \"a &gt; b: \" &lt;&lt; (a &gt; b) &lt;&lt; endl;   \/\/ 1 (true)\n    cout &lt;&lt; \"a &lt; b: \" &lt;&lt; (a &lt; b) &lt;&lt; endl;   \/\/ 0 (false)\n    return 0;\n}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. \u903b\u8f91\u8fd0\u7b97\u7b26\uff08Logical Operators\uff09<\/strong><\/h2>\n\n\n\n<p>\u903b\u8f91\u8fd0\u7b97\u7b26\u7528\u4e8e\u5728\u6761\u4ef6\u8bed\u53e5\u4e2d\u8fdb\u884c\u5e03\u5c14\u8fd0\u7b97\uff0c\u901a\u5e38\u4e0e <code>if<\/code> \u6216 <code>while<\/code> \u7b49\u6761\u4ef6\u8bed\u53e5\u7ed3\u5408\u4f7f\u7528\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8fd0\u7b97\u7b26<\/th><th>\u63cf\u8ff0<\/th><th>\u793a\u4f8b<\/th><\/tr><\/thead><tbody><tr><td><code>&amp;&amp;<\/code><\/td><td>\u903b\u8f91\u4e0e<\/td><td><code>a &amp;&amp; b<\/code><\/td><\/tr><tr><td><code>||<\/code><\/td><td>\u903b\u8f91\u6216<\/td><td><code>a || b<\/code><\/td><\/tr><tr><td><code>!<\/code><\/td><td>\u903b\u8f91\u975e<\/td><td><code>!a<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a\u4f7f\u7528\u903b\u8f91\u8fd0\u7b97\u7b26<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n    bool a = true, b = false;\n    cout &lt;&lt; \"(a &amp;&amp; b): \" &lt;&lt; (a &amp;&amp; b) &lt;&lt; endl;  \/\/ 0 (false)\n    cout &lt;&lt; \"(a || b): \" &lt;&lt; (a || b) &lt;&lt; endl;  \/\/ 1 (true)\n    cout &lt;&lt; \"(!a): \" &lt;&lt; (!a) &lt;&lt; endl;          \/\/ 0 (false)\n    return 0;\n}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. \u4f4d\u8fd0\u7b97\u7b26\uff08Bitwise Operators\uff09<\/strong><\/h2>\n\n\n\n<p>\u4f4d\u8fd0\u7b97\u7b26\u7528\u4e8e\u64cd\u4f5c\u6574\u6570\u7c7b\u578b\u7684\u4e8c\u8fdb\u5236\u4f4d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8fd0\u7b97\u7b26<\/th><th>\u63cf\u8ff0<\/th><th>\u793a\u4f8b<\/th><\/tr><\/thead><tbody><tr><td><code>&amp;<\/code><\/td><td>\u6309\u4f4d\u4e0e<\/td><td><code>a &amp; b<\/code><\/td><\/tr><tr><td><code>|<\/code><\/td><td>\u6309\u4f4d\u6216<\/td><td><code>a | b<\/code><\/td><\/tr><tr><td><code>^<\/code><\/td><td>\u6309\u4f4d\u5f02\u6216<\/td><td><code>a ^ b<\/code><\/td><\/tr><tr><td><code>~<\/code><\/td><td>\u6309\u4f4d\u53d6\u53cd<\/td><td><code>~a<\/code><\/td><\/tr><tr><td><code>&lt;&lt;<\/code><\/td><td>\u5de6\u79fb<\/td><td><code>a &lt;&lt; b<\/code><\/td><\/tr><tr><td><code>&gt;&gt;<\/code><\/td><td>\u53f3\u79fb<\/td><td><code>a &gt;&gt; b<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a\u4f7f\u7528\u4f4d\u8fd0\u7b97\u7b26<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n    int a = 5, b = 3;\n    cout &lt;&lt; \"(a &amp; b): \" &lt;&lt; (a &amp; b) &lt;&lt; endl;  \/\/ 1\n    cout &lt;&lt; \"(a | b): \" &lt;&lt; (a | b) &lt;&lt; endl;  \/\/ 7\n    cout &lt;&lt; \"(a ^ b): \" &lt;&lt; (a ^ b) &lt;&lt; endl;  \/\/ 6\n    cout &lt;&lt; \"(~a): \" &lt;&lt; (~a) &lt;&lt; endl;        \/\/ -6\n    cout &lt;&lt; \"(a &lt;&lt; 1): \" &lt;&lt; (a &lt;&lt; 1) &lt;&lt; endl; \/\/ 10\n    cout &lt;&lt; \"(a &gt;&gt; 1): \" &lt;&lt; (a &gt;&gt; 1) &lt;&lt; endl; \/\/ 2\n    return 0;\n}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5. \u8d4b\u503c\u8fd0\u7b97\u7b26\uff08Assignment Operators\uff09<\/strong><\/h2>\n\n\n\n<p>\u8d4b\u503c\u8fd0\u7b97\u7b26\u7528\u4e8e\u5c06\u4e00\u4e2a\u503c\u8d4b\u7ed9\u4e00\u4e2a\u53d8\u91cf\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8fd0\u7b97\u7b26<\/th><th>\u63cf\u8ff0<\/th><th>\u793a\u4f8b<\/th><\/tr><\/thead><tbody><tr><td><code>=<\/code><\/td><td>\u8d4b\u503c<\/td><td><code>a = b<\/code><\/td><\/tr><tr><td><code>+=<\/code><\/td><td>\u52a0\u6cd5\u8d4b\u503c<\/td><td><code>a += b<\/code><\/td><\/tr><tr><td><code>-=<\/code><\/td><td>\u51cf\u6cd5\u8d4b\u503c<\/td><td><code>a -= b<\/code><\/td><\/tr><tr><td><code>*=<\/code><\/td><td>\u4e58\u6cd5\u8d4b\u503c<\/td><td><code>a *= b<\/code><\/td><\/tr><tr><td><code>\/=<\/code><\/td><td>\u9664\u6cd5\u8d4b\u503c<\/td><td><code>a \/= b<\/code><\/td><\/tr><tr><td><code>%=<\/code><\/td><td>\u53d6\u4f59\u8d4b\u503c<\/td><td><code>a %= b<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a\u4f7f\u7528\u8d4b\u503c\u8fd0\u7b97\u7b26<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n    int a = 10;\n    a += 5;  \/\/ a = a + 5\n    cout &lt;&lt; \"a += 5: \" &lt;&lt; a &lt;&lt; endl;  \/\/ 15\n    a -= 3;  \/\/ a = a - 3\n    cout &lt;&lt; \"a -= 3: \" &lt;&lt; a &lt;&lt; endl;  \/\/ 12\n    return 0;\n}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>6. \u81ea\u589e\u4e0e\u81ea\u51cf\u8fd0\u7b97\u7b26\uff08Increment and Decrement Operators\uff09<\/strong><\/h2>\n\n\n\n<p>\u81ea\u589e\uff08<code>++<\/code>\uff09\u548c\u81ea\u51cf\uff08<code>--<\/code>\uff09\u8fd0\u7b97\u7b26\u7528\u4e8e\u589e\u52a0\u6216\u51cf\u5c11\u4e00\u4e2a\u53d8\u91cf\u7684\u503c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8fd0\u7b97\u7b26<\/th><th>\u63cf\u8ff0<\/th><th>\u793a\u4f8b<\/th><\/tr><\/thead><tbody><tr><td><code>++<\/code><\/td><td>\u81ea\u589e<\/td><td><code>a++<\/code> \u6216 <code>++a<\/code><\/td><\/tr><tr><td><code>--<\/code><\/td><td>\u81ea\u51cf<\/td><td><code>a--<\/code> \u6216 <code>--a<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a\u4f7f\u7528\u81ea\u589e\u4e0e\u81ea\u51cf\u8fd0\u7b97\u7b26<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n    int a = 5;\n    cout &lt;&lt; \"a++: \" &lt;&lt; a++ &lt;&lt; endl;  \/\/ \u8f93\u51fa 5\uff0ca \u589e\u52a0\u4e3a 6\n    cout &lt;&lt; \"++a: \" &lt;&lt; ++a &lt;&lt; endl;  \/\/ \u8f93\u51fa 7\n    cout &lt;&lt; \"a--: \" &lt;&lt; a-- &lt;&lt; endl;  \/\/ \u8f93\u51fa 7\uff0ca \u51cf\u5c11\u4e3a 6\n    cout &lt;&lt; \"--a: \" &lt;&lt; --a &lt;&lt; endl;  \/\/ \u8f93\u51fa 5\n    return 0;\n}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>7. \u6761\u4ef6\u8fd0\u7b97\u7b26\uff08\u4e09\u5143\u8fd0\u7b97\u7b26\uff09<\/strong><\/h2>\n\n\n\n<p>\u6761\u4ef6\u8fd0\u7b97\u7b26\u662f\u4e00\u4e2a\u4e09\u76ee\u8fd0\u7b97\u7b26\uff0c\u6839\u636e\u6761\u4ef6\u5224\u65ad\u8fd4\u56de\u4e0d\u540c\u7684\u503c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8fd0\u7b97\u7b26<\/th><th>\u63cf\u8ff0<\/th><th>\u793a\u4f8b<\/th><\/tr><\/thead><tbody><tr><td><code>? :<\/code><\/td><td>\u6761\u4ef6\u8fd0\u7b97\u7b26<\/td><td><code>condition ? a : b<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a\u4f7f\u7528\u6761\u4ef6\u8fd0\u7b97\u7b26<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n    int a = 10, b = 5;\n    int result = (a &gt; b) ? a : b;  \/\/ \u5982\u679c a &gt; b\uff0c\u5219\u8fd4\u56de a\uff0c\u5426\u5219\u8fd4\u56de b\n    cout &lt;&lt; \"result: \" &lt;&lt; result &lt;&lt; endl;  \/\/ 10\n    return 0;\n}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>8. \u7c7b\u578b\u8f6c\u6362\u8fd0\u7b97\u7b26\uff08Type-Casting Operators\uff09<\/strong><\/h2>\n\n\n\n<p>\u7c7b\u578b\u8f6c\u6362\u8fd0\u7b97\u7b26\u7528\u4e8e\u5c06\u4e00\u79cd\u6570\u636e\u7c7b\u578b\u7684\u503c\u8f6c\u6362\u4e3a\u53e6\u4e00\u79cd\u6570\u636e\u7c7b\u578b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8fd0\u7b97\u7b26<\/th><th>\u63cf\u8ff0<\/th><th>\u793a\u4f8b<\/th><\/tr><\/thead><tbody><tr><td><code>static_cast<\/code><\/td><td>\u9759\u6001\u7c7b\u578b\u8f6c\u6362<\/td><td><code>static_cast&lt;int&gt;(a)<\/code><\/td><\/tr><tr><td><code>dynamic_cast<\/code><\/td><td>\u52a8\u6001\u7c7b\u578b\u8f6c\u6362<\/td><td><code>dynamic_cast&lt;type&gt;(object)<\/code><\/td><\/tr><tr><td><code>const_cast<\/code><\/td><td>\u5e38\u91cf\u8f6c\u6362<\/td><td><code>const_cast&lt;const type&gt;(a)<\/code><\/td><\/tr><tr><td><code>reinterpret_cast<\/code><\/td><td>\u91cd\u89e3\u91ca\u7c7b\u578b\u8f6c\u6362<\/td><td><code>reinterpret_cast&lt;type&gt;(a)<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a\u4f7f\u7528 <code>static_cast<\/code><\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n    double a = 5.7;\n    int b = static_cast&lt;int&gt;(a);  \/\/ \u5c06 double \u8f6c\u6362\u4e3a int\n    cout &lt;&lt; \"b: \" &lt;&lt; b &lt;&lt; endl;   \/\/ \u8f93\u51fa 5\n    return 0;\n}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u603b\u7ed3<\/strong><\/h2>\n\n\n\n<p>C++ \u8fd0\u7b97\u7b26\u79cd\u7c7b\u7e41\u591a\uff0c\u5404\u79cd\u8fd0\u7b97\u7b26\u80fd\u591f\u5e2e\u52a9\u5f00\u53d1\u8005\u5728\u7a0b\u5e8f\u4e2d\u5b9e\u73b0\u5404\u79cd\u4e0d\u540c\u7684\u64cd\u4f5c\u3002\u638c\u63e1\u8fd9\u4e9b\u8fd0\u7b97\u7b26\u5e76\u7406\u89e3\u5b83\u4eec\u7684\u4f7f\u7528\u573a\u666f\uff0c\u662f\u9ad8\u6548\u7f16\u5199 C++ \u7a0b\u5e8f\u7684\u57fa\u7840\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8fd0\u7b97\u7b26\u7c7b\u578b<\/th><th>\u793a\u4f8b<\/th><\/tr><\/thead><tbody><tr><td>\u7b97\u672f\u8fd0\u7b97\u7b26<\/td><td><code>+<\/code>, <code>-<\/code>, <code>*<\/code>, <code>\/<\/code><\/td><\/tr><tr><td>\u5173\u7cfb\u8fd0\u7b97\u7b26<\/td><td><code>==<\/code>, <code>!=<\/code>, <code>&gt;<\/code>, <code>&lt;<\/code><\/td><\/tr><tr><td>\u903b\u8f91\u8fd0\u7b97\u7b26<\/td><td><code>&amp;&amp;<\/code>, <code>||<\/code>, <code>!<\/code><\/td><\/tr><tr><td>\u4f4d\u8fd0\u7b97\u7b26<\/td><td><code>&amp;<\/code>, <code>|<\/code>, <code>^<\/code>, <code>&lt;&lt;<\/code><\/td><\/tr><tr><td>\u8d4b\u503c\u8fd0\u7b97\u7b26<\/td><td><code>=<\/code>, <code>+=<\/code>, <code>-=<\/code><\/td><\/tr><tr><td>\u81ea\u589e\/\u81ea\u51cf\u8fd0\u7b97\u7b26<\/td><td><code>++<\/code>, <code>--<\/code><\/td><\/tr><tr><td>\u6761\u4ef6\u8fd0\u7b97\u7b26<\/td><td><code>? :<\/code><\/td><\/tr><tr><td>\u7c7b\u578b\u8f6c\u6362\u8fd0\u7b97\u7b26<\/td><td><code>static_cast<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>C++ \u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u8fd0\u7b97\u7b26\uff0c\u7528\u4e8e\u8fdb\u884c\u5404\u79cd\u8fd0\u7b97\u548c\u64cd\u4f5c\u3002\u8fd0\u7b97\u7b26\u662f\u6267\u884c\u64cd\u4f5c\u7684\u7b26\u53f7\uff0c\u7528\u6765\u5904\u7406\u6570\u636e\u5e76\u751f\u6210\u7ed3\u679c\u3002\u8fd0\u7b97\u7b26\u7684\u79cd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3257,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[81],"tags":[],"class_list":["post-3256","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-"],"_links":{"self":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/3256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/comments?post=3256"}],"version-history":[{"count":1,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/3256\/revisions"}],"predecessor-version":[{"id":3258,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/3256\/revisions\/3258"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media\/3257"}],"wp:attachment":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media?parent=3256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/categories?post=3256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/tags?post=3256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}