{"id":3295,"date":"2025-03-29T15:14:25","date_gmt":"2025-03-29T07:14:25","guid":{"rendered":"https:\/\/www.laixuexila.com\/?p=3295"},"modified":"2025-03-29T15:14:25","modified_gmt":"2025-03-29T07:14:25","slug":"c-%e7%b1%bb%e4%b8%8e%e5%af%b9%e8%b1%a1%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.laixuexila.com\/index.php\/2025\/03\/29\/c-%e7%b1%bb%e4%b8%8e%e5%af%b9%e8%b1%a1%e8%af%a6%e8%a7%a3\/","title":{"rendered":"C++ \u7c7b\u4e0e\u5bf9\u8c61\u8be6\u89e3"},"content":{"rendered":"\n<p>\u5728 C++ \u4e2d\uff0c\u7c7b\uff08Class\uff09\u662f\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\uff08OOP\uff09\u7684\u4e00\u90e8\u5206\uff0c\u662f\u4e00\u79cd\u7528\u6237\u81ea\u5b9a\u4e49\u7684\u6570\u636e\u7c7b\u578b\uff0c\u7528\u4e8e\u5c01\u88c5\u6570\u636e\u548c\u76f8\u5173\u64cd\u4f5c\u3002\u7c7b\u5c06\u6570\u636e\u548c\u64cd\u4f5c\u6570\u636e\u7684\u51fd\u6570\uff08\u79f0\u4e3a\u65b9\u6cd5\uff09\u7ed1\u5b9a\u5728\u4e00\u8d77\uff0c\u4ece\u800c\u5b9e\u73b0\u6570\u636e\u62bd\u8c61\u548c\u5c01\u88c5\u3002\u5bf9\u8c61\u662f\u7c7b\u7684\u5b9e\u4f8b\uff0c\u901a\u8fc7\u7c7b\u6765\u521b\u5efa\u5bf9\u8c61\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. \u7c7b\u7684\u57fa\u672c\u6982\u5ff5<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7c7b (Class)<\/strong>\uff1a\u7c7b\u662f\u6570\u636e\u548c\u51fd\u6570\u7684\u96c6\u5408\uff0c\u7528\u6765\u63cf\u8ff0\u4e00\u7c7b\u5bf9\u8c61\u7684\u5c5e\u6027\u548c\u884c\u4e3a\u3002<\/li>\n\n\n\n<li><strong>\u5bf9\u8c61 (Object)<\/strong>\uff1a\u5bf9\u8c61\u662f\u7c7b\u7684\u5b9e\u4f8b\u3002\u53ef\u4ee5\u901a\u8fc7\u7c7b\u6765\u521b\u5efa\u5bf9\u8c61\uff0c\u6bcf\u4e2a\u5bf9\u8c61\u90fd\u6709\u81ea\u5df1\u7684\u6570\u636e\u6210\u5458\u548c\u65b9\u6cd5\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. \u7c7b\u7684\u5b9a\u4e49<\/strong><\/h3>\n\n\n\n<p>\u7c7b\u7684\u5b9a\u4e49\u5305\u62ec\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7c7b\u540d<\/strong>\uff1a\u7c7b\u7684\u6807\u8bc6\u7b26\uff0c\u7528\u4e8e\u5f15\u7528\u7c7b\u3002<\/li>\n\n\n\n<li><strong>\u6210\u5458\u53d8\u91cf<\/strong>\uff1a\u7c7b\u4e2d\u7684\u53d8\u91cf\uff0c\u7528\u6765\u5b58\u50a8\u6570\u636e\u3002<\/li>\n\n\n\n<li><strong>\u6210\u5458\u51fd\u6570<\/strong>\uff1a\u7c7b\u4e2d\u7684\u51fd\u6570\uff0c\u5b9a\u4e49\u5bf9\u8c61\u7684\u884c\u4e3a\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u7c7b\u7684\u57fa\u672c\u7ed3\u6784\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class ClassName {\n    public:    \/\/ \u8bbf\u95ee\u4fee\u9970\u7b26\n        \/\/ \u6784\u9020\u51fd\u6570\n        ClassName();  \n        \/\/ \u6210\u5458\u51fd\u6570\n        void memberFunction();  \n    private:\n        \/\/ \u6570\u636e\u6210\u5458\n        int data;\n};<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. \u7c7b\u7684\u6784\u9020\u51fd\u6570\u4e0e\u6790\u6784\u51fd\u6570<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6784\u9020\u51fd\u6570 (Constructor)<\/strong>\uff1a\u7528\u4e8e\u521b\u5efa\u5bf9\u8c61\u5e76\u521d\u59cb\u5316\u5bf9\u8c61\u7684\u6210\u5458\u53d8\u91cf\u3002\u6784\u9020\u51fd\u6570\u7684\u540d\u79f0\u4e0e\u7c7b\u540d\u76f8\u540c\u3002<\/li>\n\n\n\n<li><strong>\u6790\u6784\u51fd\u6570 (Destructor)<\/strong>\uff1a\u7528\u4e8e\u9500\u6bc1\u5bf9\u8c61\u65f6\u91ca\u653e\u8d44\u6e90\uff0c\u6790\u6784\u51fd\u6570\u7684\u540d\u79f0\u4e0e\u7c7b\u540d\u76f8\u540c\uff0c\u4f46\u524d\u9762\u52a0\u4e0a <code>~<\/code>\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\nusing namespace std;\n\nclass Car {\npublic:\n    \/\/ \u6784\u9020\u51fd\u6570\n    Car(string model, int year) {\n        this-&gt;model = model;\n        this-&gt;year = year;\n        cout &lt;&lt; \"Car object created: \" &lt;&lt; model &lt;&lt; \" \" &lt;&lt; year &lt;&lt; endl;\n    }\n\n    \/\/ \u6790\u6784\u51fd\u6570\n    ~Car() {\n        cout &lt;&lt; \"Car object destroyed: \" &lt;&lt; model &lt;&lt; \" \" &lt;&lt; year &lt;&lt; endl;\n    }\n\n    \/\/ \u6210\u5458\u51fd\u6570\n    void display() {\n        cout &lt;&lt; \"Model: \" &lt;&lt; model &lt;&lt; \", Year: \" &lt;&lt; year &lt;&lt; endl;\n    }\n\nprivate:\n    string model;\n    int year;\n};\n\nint main() {\n    Car car1(\"Tesla\", 2020);  \/\/ \u521b\u5efa\u5bf9\u8c61\n    car1.display();\n\n    \/\/ \u5728\u51fd\u6570\u7ed3\u675f\u65f6\u81ea\u52a8\u8c03\u7528\u6790\u6784\u51fd\u6570\uff0c\u9500\u6bc1 car1 \u5bf9\u8c61\n    return 0;\n}<\/code><\/pre>\n\n\n\n<p><strong>\u8f93\u51fa\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Car object created: Tesla 2020\nModel: Tesla, Year: 2020\nCar object destroyed: Tesla 2020<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. \u7c7b\u7684\u6210\u5458\u51fd\u6570<\/strong><\/h3>\n\n\n\n<p>\u7c7b\u7684\u6210\u5458\u51fd\u6570\u7528\u4e8e\u64cd\u4f5c\u7c7b\u4e2d\u7684\u6570\u636e\u6210\u5458\u3002\u6210\u5458\u51fd\u6570\u53ef\u4ee5\u5b9a\u4e49\u4e3a\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u666e\u901a\u6210\u5458\u51fd\u6570<\/strong>\uff1a\u4f5c\u7528\u4e8e\u5bf9\u8c61\u3002<\/li>\n\n\n\n<li><strong>\u9759\u6001\u6210\u5458\u51fd\u6570<\/strong>\uff1a\u4e0e\u7c7b\u76f8\u5173\uff0c\u800c\u4e0d\u662f\u4e0e\u67d0\u4e2a\u5bf9\u8c61\u5b9e\u4f8b\u76f8\u5173\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u666e\u901a\u6210\u5458\u51fd\u6570<\/strong>\uff1a\u666e\u901a\u6210\u5458\u51fd\u6570\u9700\u8981\u901a\u8fc7\u5bf9\u8c61\u6765\u8c03\u7528\u3002<\/p>\n\n\n\n<p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Rectangle {\npublic:\n    void setDimensions(int l, int b) {\n        length = l;\n        breadth = b;\n    }\n\n    int area() {\n        return length * breadth;\n    }\n\nprivate:\n    int length;\n    int breadth;\n};\n\nint main() {\n    Rectangle rect;\n    rect.setDimensions(10, 5);\n    cout &lt;&lt; \"Area of rectangle: \" &lt;&lt; rect.area() &lt;&lt; endl;\n    return 0;\n}<\/code><\/pre>\n\n\n\n<p><strong>\u9759\u6001\u6210\u5458\u51fd\u6570<\/strong>\uff1a\u9759\u6001\u6210\u5458\u51fd\u6570\u5c5e\u4e8e\u7c7b\u672c\u8eab\uff0c\u800c\u4e0d\u662f\u67d0\u4e2a\u5bf9\u8c61\u5b9e\u4f8b\uff0c\u53ef\u4ee5\u901a\u8fc7\u7c7b\u540d\u76f4\u63a5\u8c03\u7528\u3002<\/p>\n\n\n\n<p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Counter {\npublic:\n    static int count;\n\n    Counter() {\n        count++;\n    }\n\n    static void showCount() {\n        cout &lt;&lt; \"Count: \" &lt;&lt; count &lt;&lt; endl;\n    }\n};\n\nint Counter::count = 0;\n\nint main() {\n    Counter::showCount(); \/\/ \u8c03\u7528\u9759\u6001\u6210\u5458\u51fd\u6570\n\n    Counter c1, c2;\n    Counter::showCount(); \/\/ \u8c03\u7528\u9759\u6001\u6210\u5458\u51fd\u6570\n\n    return 0;\n}<\/code><\/pre>\n\n\n\n<p><strong>\u8f93\u51fa\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Count: 0\nCount: 2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. \u5bf9\u8c61\u7684\u521b\u5efa\u4e0e\u9500\u6bc1<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u521b\u5efa\u5bf9\u8c61<\/strong>\uff1a\u901a\u8fc7\u7c7b\u7684\u6784\u9020\u51fd\u6570\u6765\u521b\u5efa\u5bf9\u8c61\u3002<\/li>\n\n\n\n<li><strong>\u9500\u6bc1\u5bf9\u8c61<\/strong>\uff1a\u5f53\u5bf9\u8c61\u7684\u4f5c\u7528\u57df\u7ed3\u675f\u65f6\uff0c\u6790\u6784\u51fd\u6570\u4f1a\u81ea\u52a8\u8c03\u7528\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Box {\npublic:\n    Box(int l, int b, int h) : length(l), breadth(b), height(h) {}\n\n    int volume() {\n        return length * breadth * height;\n    }\n\nprivate:\n    int length;\n    int breadth;\n    int height;\n};\n\nint main() {\n    Box box1(3, 4, 5);  \/\/ \u521b\u5efa\u5bf9\u8c61\n    cout &lt;&lt; \"Volume of box1: \" &lt;&lt; box1.volume() &lt;&lt; endl;\n\n    return 0;\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. \u8bbf\u95ee\u63a7\u5236<\/strong><\/h3>\n\n\n\n<p>C++ \u7c7b\u4e2d\u7684\u6210\u5458\u53ef\u4ee5\u6709\u4e0d\u540c\u7684\u8bbf\u95ee\u6743\u9650\uff0c\u8fd9\u7531\u8bbf\u95ee\u4fee\u9970\u7b26\u51b3\u5b9a\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>public<\/strong>\uff1a\u516c\u6709\u6210\u5458\uff0c\u7c7b\u5916\u90e8\u53ef\u4ee5\u8bbf\u95ee\u3002<\/li>\n\n\n\n<li><strong>private<\/strong>\uff1a\u79c1\u6709\u6210\u5458\uff0c\u7c7b\u5916\u90e8\u4e0d\u53ef\u8bbf\u95ee\u3002<\/li>\n\n\n\n<li><strong>protected<\/strong>\uff1a\u4fdd\u62a4\u6210\u5458\uff0c\u5b50\u7c7b\u53ef\u4ee5\u8bbf\u95ee\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Student {\npublic:\n    string name;\n    int age;\n\n    void setDetails(string n, int a) {\n        name = n;\n        age = a;\n    }\n\n    void display() {\n        cout &lt;&lt; \"Name: \" &lt;&lt; name &lt;&lt; \", Age: \" &lt;&lt; age &lt;&lt; endl;\n    }\n};\n\nint main() {\n    Student s1;\n    s1.setDetails(\"John\", 21);\n    s1.display();\n    return 0;\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>7. \u7c7b\u7684\u7ee7\u627f (Inheritance)<\/strong><\/h3>\n\n\n\n<p>C++ \u652f\u6301\u7ee7\u627f\u673a\u5236\uff0c\u5141\u8bb8\u521b\u5efa\u4e00\u4e2a\u7c7b\uff08\u5b50\u7c7b\uff09\u4ece\u53e6\u4e00\u4e2a\u7c7b\uff08\u57fa\u7c7b\uff09\u7ee7\u627f\u6210\u5458\u3002\u8fd9\u4f7f\u5f97\u53ef\u4ee5\u91cd\u7528\u5df2\u6709\u7c7b\u7684\u529f\u80fd\uff0c\u5e76\u901a\u8fc7\u7ee7\u627f\u6dfb\u52a0\u6216\u4fee\u6539\u529f\u80fd\u3002<\/p>\n\n\n\n<p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Animal {\npublic:\n    void speak() {\n        cout &lt;&lt; \"Animal makes a sound\" &lt;&lt; endl;\n    }\n};\n\nclass Dog : public Animal {  \/\/ Dog \u7ee7\u627f Animal \u7c7b\npublic:\n    void speak() {\n        cout &lt;&lt; \"Dog barks\" &lt;&lt; endl;\n    }\n};\n\nint main() {\n    Dog dog;\n    dog.speak();  \/\/ \u8c03\u7528\u91cd\u5199\u7684\u51fd\u6570\n    return 0;\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>8. \u591a\u6001 (Polymorphism)<\/strong><\/h3>\n\n\n\n<p>\u591a\u6001\u662f\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u7684\u7279\u6027\uff0c\u5141\u8bb8\u4f7f\u7528\u76f8\u540c\u7684\u63a5\u53e3\u8c03\u7528\u4e0d\u540c\u7c7b\u578b\u7684\u5bf9\u8c61\u884c\u4e3a\u3002C++ \u652f\u6301\u4e24\u79cd\u591a\u6001\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u9759\u6001\u591a\u6001\uff08\u7f16\u8bd1\u65f6\u591a\u6001\uff09<\/strong>\uff1a\u51fd\u6570\u91cd\u8f7d\u3001\u8fd0\u7b97\u7b26\u91cd\u8f7d\u3002<\/li>\n\n\n\n<li><strong>\u52a8\u6001\u591a\u6001\uff08\u8fd0\u884c\u65f6\u591a\u6001\uff09<\/strong>\uff1a\u57fa\u7c7b\u6307\u9488\u8c03\u7528\u6d3e\u751f\u7c7b\u91cd\u5199\u7684\u51fd\u6570\uff0c\u901a\u5e38\u4e0e\u865a\u51fd\u6570\u7ed3\u5408\u4f7f\u7528\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Base {\npublic:\n    virtual void show() {  \/\/ \u865a\u51fd\u6570\n        cout &lt;&lt; \"Base class\" &lt;&lt; endl;\n    }\n};\n\nclass Derived : public Base {\npublic:\n    void show() override {  \/\/ \u91cd\u5199\u57fa\u7c7b\u7684 show \u65b9\u6cd5\n        cout &lt;&lt; \"Derived class\" &lt;&lt; endl;\n    }\n};\n\nint main() {\n    Base* basePtr;\n    Derived derivedObj;\n    basePtr = &amp;derivedObj;\n\n    basePtr-&gt;show();  \/\/ \u52a8\u6001\u7ed1\u5b9a\uff0c\u8c03\u7528 Derived \u7c7b\u7684\u65b9\u6cd5\n    return 0;\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>9. \u8fd0\u7b97\u7b26\u91cd\u8f7d (Operator Overloading)<\/strong><\/h3>\n\n\n\n<p>C++ \u5141\u8bb8\u5bf9\u5185\u7f6e\u8fd0\u7b97\u7b26\u8fdb\u884c\u91cd\u8f7d\uff0c\u4f7f\u5176\u9002\u7528\u4e8e\u7528\u6237\u5b9a\u4e49\u7684\u7c7b\u3002\u901a\u8fc7\u8fd0\u7b97\u7b26\u91cd\u8f7d\uff0c\u53ef\u4ee5\u8ba9\u5bf9\u8c61\u4f7f\u7528\u81ea\u5b9a\u4e49\u7684\u8fd0\u7b97\u7b26\u3002<\/p>\n\n\n\n<p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Complex {\npublic:\n    int real, imag;\n\n    Complex operator + (Complex const &amp;other) {\n        Complex temp;\n        temp.real = real + other.real;\n        temp.imag = imag + other.imag;\n        return temp;\n    }\n};\n\nint main() {\n    Complex c1, c2, c3;\n    c1.real = 10; c1.imag = 5;\n    c2.real = 20; c2.imag = 15;\n    c3 = c1 + c2;  \/\/ \u4f7f\u7528\u91cd\u8f7d\u7684\u52a0\u6cd5\u8fd0\u7b97\u7b26\n\n    cout &lt;&lt; \"Sum: \" &lt;&lt; c3.real &lt;&lt; \" + \" &lt;&lt; c3.imag &lt;&lt; \"i\" &lt;&lt; endl;\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<ul class=\"wp-block-list\">\n<li><strong>\u7c7b\u548c\u5bf9\u8c61<\/strong>\u662f\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u7684\u6838\u5fc3\uff0c\u901a\u8fc7\u7c7b\u5c01\u88c5\u6570\u636e\u548c\u65b9\u6cd5\uff0c\u5e76\u901a\u8fc7\u5bf9\u8c61\u5b9e\u73b0\u5177\u4f53\u7684\u529f\u80fd\u3002<\/li>\n\n\n\n<li><strong>\u6784\u9020\u51fd\u6570\u4e0e\u6790\u6784\u51fd\u6570<\/strong>\u8d1f\u8d23\u5bf9\u8c61\u7684\u521b\u5efa\u4e0e\u9500\u6bc1\u3002<\/li>\n\n\n\n<li><strong>\u7ee7\u627f\u4e0e\u591a\u6001<\/strong>\u5141\u8bb8\u6269\u5c55\u548c\u91cd\u7528\u5df2\u6709\u7c7b\u7684\u529f\u80fd\uff0c\u652f\u6301\u7075\u6d3b\u7684\u52a8\u6001\u884c\u4e3a\u3002<\/li>\n\n\n\n<li><strong>\u8fd0\u7b97\u7b26\u91cd\u8f7d<\/strong>\u53ef\u4ee5\u8ba9\u5bf9\u8c61\u4f7f\u7528\u5e38\u89c4\u7684\u8fd0\u7b97\u7b26\u8fdb\u884c\u64cd\u4f5c\u3002<\/li>\n<\/ul>\n\n\n\n<p>C++ \u7684\u7c7b\u4e0e\u5bf9\u8c61\u662f\u5f3a\u5927\u4e14\u7075\u6d3b\u7684\u7f16\u7a0b\u5de5\u5177\uff0c\u5b83\u4eec\u652f\u6301\u6570\u636e\u5c01\u88c5\u3001\u7ee7\u627f\u3001\u91cd\u7528\u3001\u52a8\u6001\u884c\u4e3a\u548c\u4ee3\u7801\u53ef\u8bfb\u6027\u3002\u638c\u63e1\u8fd9\u4e9b\u6982\u5ff5\u5bf9\u6df1\u5165\u5b66\u4e60 C++ \u81f3\u5173\u91cd\u8981\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 C++ \u4e2d\uff0c\u7c7b\uff08Class\uff09\u662f\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\uff08OOP\uff09\u7684\u4e00\u90e8\u5206\uff0c\u662f\u4e00\u79cd\u7528\u6237\u81ea\u5b9a\u4e49\u7684\u6570\u636e\u7c7b\u578b\uff0c\u7528\u4e8e\u5c01\u88c5\u6570\u636e\u548c\u76f8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3296,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[81],"tags":[],"class_list":["post-3295","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\/3295","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=3295"}],"version-history":[{"count":1,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/3295\/revisions"}],"predecessor-version":[{"id":3297,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/3295\/revisions\/3297"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media\/3296"}],"wp:attachment":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media?parent=3295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/categories?post=3295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/tags?post=3295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}