{"id":4294,"date":"2020-04-18T20:37:01","date_gmt":"2020-04-18T20:37:01","guid":{"rendered":"http:\/\/wordpress.creativegigs.net\/docly\/docs\/rogan-wordpress-theme-documentation\/layouts\/full-width\/"},"modified":"2024-04-07T01:19:41","modified_gmt":"2024-04-07T01:19:41","slug":"classes","status":"publish","type":"docs","link":"https:\/\/adelnasim.com\/ar\/docs\/courses\/oop\/classes\/","title":{"rendered":"\u0627\u0644\u0641\u0626\u0627\u062a Classes"},"content":{"rendered":"<p><strong>\u0645\u0627 \u0647\u0648 \u0627\u0644\u0640class \u061f<\/strong><\/p>\n<p>\u0641\u064a \u0644\u063a\u0629 C++\u060c \u0627\u0644\u0640class \u0647\u0648 \u0646\u0648\u0639 \u0628\u064a\u0627\u0646\u0627\u062a \u0645\u062d\u062f\u062f \u0645\u0646 \u0642\u0628\u0644 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645 \u064a\u0642\u0648\u0645 \u0628\u062a\u063a\u0644\u064a\u0641 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0648\u0627\u0644\u062f\u0648\u0627\u0644 \u0627\u0644\u062a\u064a \u062a\u0639\u0645\u0644 \u0639\u0644\u0649 \u062a\u0644\u0643 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a. \u0625\u0646\u0647 \u0628\u0645\u062b\u0627\u0628\u0629 \u0645\u062e\u0637\u0637 \u0644\u0625\u0646\u0634\u0627\u0621 \u0627\u0644\u0640objects\u060c \u0648\u0647\u064a \u062e\u0635\u0627\u0626\u0635 \u0644\u0644\u0640class. \u062a\u062e\u064a\u0644 \u0627\u0644\u0640class \u0643\u0642\u0627\u0644\u0628 \u064a\u062d\u062f\u062f \u0628\u0646\u064a\u0629 \u0627\u0644\u0640objects \u0648\u0633\u0644\u0648\u0643\u0647\u0627.<\/p>\n<p>\u0644\u0644\u0625\u0639\u0644\u0627\u0646 \u0639\u0646 class \u0641\u064a C++\u060c \u064a\u0645\u0643\u0646\u0643 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0641\u062a\u0627\u062d\u064a\u0629 class.<\/p>\n<p>\u0628\u0645\u062c\u0631\u062f \u062a\u0639\u0631\u064a\u0641 class\u060c \u064a\u0645\u0643\u0646\u0643 \u0625\u0646\u0634\u0627\u0621 objects \u0645\u0646\u0647. \u0627\u0644\u0640objects \u062a\u0645\u062b\u0644 \u062e\u0635\u0627\u0626\u0635 \u0627\u0644\u0640class\u060c \u0648\u0644\u0643\u0644 \u0645\u0646\u0647\u0627 \u0645\u062c\u0645\u0648\u0639\u0629 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0647\u0627.<\/p>\n<p>\u0641\u064a \u0644\u063a\u0629 C++\u060c \u062a\u062f\u0639\u0645 \u0627\u0644\u0640classes \u0627\u0644\u0635\u0641\u0627\u062a \u0627\u0644\u062a\u0639\u0631\u064a\u0641\u064a\u0629 \u0644\u0644\u0648\u0635\u0648\u0644 \u0645\u062b\u0644  public, private, \u0648protected. \u062a\u062a\u062d\u0643\u0645 \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u0627\u062a \u0641\u064a \u0625\u0645\u0643\u0627\u0646\u064a\u0629 \u0631\u0624\u064a\u0629 \u0627\u0644\u0640class members \u0648\u0625\u0645\u0643\u0627\u0646\u064a\u0629 \u0627\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u064a\u0647\u0645.<\/p>\n<p><strong>\u0645\u062b\u0627\u0644 1:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;iostream&gt;\r\n#include &lt;cstring&gt;\r\n#include &lt;algorithm&gt;\r\nusing namespace std;\r\n\r\nclass car{\r\n    private: \r\n        char name[15];\r\n        char color[10];\r\n        int maxSpeed;\r\n        int model;\r\n    public:\r\n        void setName(char n[])\r\n        {\r\n            strcpy_s(name, n);\r\n        }\r\n        void setColor(char n[])\r\n        {\r\n            strcpy_s(color, n);\r\n        }\r\n        void setMaxSpeed(int m)\r\n        {\r\n            maxSpeed = m;\r\n        }\r\n        void setModel(int m)\r\n        {\r\n            model = m;\r\n        }\r\n        char* getName()\r\n        {\r\n            return name;\r\n        }\r\n        char* getColor()\r\n        {\r\n            return color;\r\n        }\r\n        int getMaxSpeed()\r\n        {\r\n            return maxSpeed;\r\n        }\r\n        int getModel()\r\n        {\r\n            return model;\r\n        }\r\n        void print()\r\n        {\r\n            cout &lt;&lt; \"name = \" &lt;&lt; name &lt;&lt; \"\\n\"\r\n            &lt;&lt; \"color = \" &lt;&lt; color &lt;&lt; \"\\n\"\r\n            &lt;&lt; \"maxspeed = \" &lt;&lt; maxSpeed &lt;&lt; \"\\n\"\r\n            &lt;&lt; \"model = \" &lt;&lt; model &lt;&lt; \"\\n\";\r\n        }\r\n};\r\nint main()\r\n{\r\n    car x;\r\n    x.setName(\"kia\");\r\n    x.setColor(\"red\");\r\n    x.setMaxSpeed(300);\r\n    x.setModel(2017);\r\n    x.print();\r\n    return 0;\r\n}\r\n<\/pre>\n<p>\u064a\u062d\u062f\u062f \u0643\u0648\u062f C++ \u0647\u0630\u0627 class \u0628\u0633\u064a\u0637 \u064a\u0633\u0645\u0649 \u0633\u064a\u0627\u0631\u0629 \u064a\u0645\u062b\u0644 \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u062d\u0648\u0644 \u0627\u0644\u0633\u064a\u0627\u0631\u0629\u060c \u0645\u062b\u0644 \u0627\u0633\u0645\u0647\u0627 \u0648\u0644\u0648\u0646\u0647\u0627 \u0648\u0633\u0631\u0639\u062a\u0647\u0627 \u0627\u0644\u0642\u0635\u0648\u0649 \u0648\u0637\u0631\u0627\u0632\u0647\u0627. \u064a\u0642\u0648\u0645 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c \u0628\u0625\u0646\u0634\u0627\u0621 \u062e\u0635\u0627\u0626\u0635 \u0644\u0647\u0630\u0627 \u0627\u0644\u0640class\u060c \u0648\u064a\u062d\u062f\u062f \u0633\u0645\u0627\u062a\u0647\u060c \u0648\u064a\u0637\u0628\u0639 \u0627\u0644\u062a\u0641\u0627\u0635\u064a\u0644 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u062f\u0648\u0627\u0644 \u0627\u0644\u0623\u0639\u0636\u0627\u0621. \u062f\u0639\u0648\u0646\u0627 \u0646\u062d\u0644\u0644 \u0627\u0644\u0643\u0648\u062f \u062e\u0637\u0648\u0629 \u0628\u062e\u0637\u0648\u0629:<\/p>\n<ul>\n<li>\u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0640class \u0627\u0644\u0645\u0633\u0645\u0649 \u0628\u0640car<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">class car {\r\nprivate: \r\n    char name[15];\r\n    char color[10];\r\n    int maxSpeed;\r\n    int model;\r\npublic:\r\n    \/\/ Member functions for setting attributes\r\n    void setName(char n[]) { strcpy_s(name, n); }\r\n    void setColor(char n[]) { strcpy_s(color, n); }\r\n    void setMaxSpeed(int m) { maxSpeed = m; }\r\n    void setModel(int m) { model = m; }\r\n\r\n    \/\/ Member functions for retrieving attributes\r\n    char* getName() { return name; }\r\n    char* getColor() { return color; }\r\n    int getMaxSpeed() { return maxSpeed; }\r\n    int getModel() { return model; }\r\n\r\n    \/\/ Member function to print details\r\n    void print() {\r\n        cout &lt;&lt; \"name = \" &lt;&lt; name &lt;&lt; \"\\n\"\r\n             &lt;&lt; \"color = \" &lt;&lt; color &lt;&lt; \"\\n\"\r\n             &lt;&lt; \"maxspeed = \" &lt;&lt; maxSpeed &lt;&lt; \"\\n\"\r\n             &lt;&lt; \"model = \" &lt;&lt; model &lt;&lt; \"\\n\";\r\n    }\r\n};\r\n<\/pre>\n<p>- Private Members: \u064a\u062d\u062a\u0648\u064a \u0627\u0644\u0640class \u0639\u0644\u0649 \u0645\u062a\u063a\u064a\u0631\u0627\u062a \u0627\u0644\u0640private member (\u0627\u0644\u0627\u0633\u0645 \u0648\u0627\u0644\u0644\u0648\u0646 \u0648\u0627\u0644\u062d\u062f \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u0633\u0631\u0639\u0629 \u0648\u0627\u0644\u0637\u0631\u0627\u0632)\u060c \u0648\u0627\u0644\u062a\u064a \u0644\u0627 \u064a\u0645\u0643\u0646 \u0627\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u064a\u0647\u0627 \u0625\u0644\u0627 \u062f\u0627\u062e\u0644 \u0627\u0644\u0640class.<\/p>\n<p>- Public Members: \u064a\u0648\u0641\u0631 \u0627\u0644\u0640class \u062f\u0648\u0627\u0644 \u0627\u0644\u0640public member (setName\u060c \u0648setColor\u060c \u0648setMaxSpeed\u060c \u0648\u0645\u0627 \u0625\u0644\u0649 \u0630\u0644\u0643) \u0644\u062a\u0639\u064a\u064a\u0646 \u0648\u0627\u0633\u062a\u0631\u062c\u0627\u0639 \u0642\u064a\u0645 \u0647\u0630\u0647 \u0627\u0644\u0645\u062a\u063a\u064a\u0631\u0627\u062a \u0627\u0644\u062e\u0627\u0635\u0629.<\/p>\n<ul>\n<li>\u0627\u0644\u062f\u0627\u0644\u0629 \u0627\u0644\u0631\u0626\u064a\u0633\u0629 main:<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">int main() {\r\n    car x;\r\n\r\n    \/\/ Setting attributes of the car\r\n    x.setName(\"kia\");\r\n    x.setColor(\"red\");\r\n    x.setMaxSpeed(300);\r\n    x.setModel(2017);\r\n\r\n    \/\/ Printing the details using the print() member function\r\n    x.print();\r\n\r\n    return 0;\r\n}\r\n<\/pre>\n<p>\u2013 \u0625\u0646\u0634\u0627\u0621 \u0627\u0644\u0643\u0627\u0626\u0646 object: \u064a\u062a\u0645 \u0625\u0646\u0634\u0627\u0621 \u0643\u0627\u0626\u0646 x \u0645\u0646 \u0646\u0648\u0639 car.<\/p>\n<p>- \u0633\u0645\u0627\u062a \u0627\u0644\u0625\u0639\u062f\u0627\u062f: \u064a\u062a\u0645 \u062a\u0639\u064a\u064a\u0646 \u0633\u0645\u0627\u062a \u0627\u0644\u0633\u064a\u0627\u0631\u0629 (\u0627\u0644\u0627\u0633\u0645 \u0648\u0627\u0644\u0644\u0648\u0646 \u0648\u0627\u0644\u0633\u0631\u0639\u0629 \u0627\u0644\u0642\u0635\u0648\u0649 \u0648\u0627\u0644\u0637\u0631\u0627\u0632) \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0648\u0638\u0627\u0626\u0641 \u0627\u0644\u0623\u0639\u0636\u0627\u0621 (setName \u0648setColor \u0648setMaxSpeed \u0648setModel).<\/p>\n<p>\u2013 \u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0637\u0628\u0627\u0639\u0629: \u062a\u062a\u0645 \u0637\u0628\u0627\u0639\u0629 \u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0633\u064a\u0627\u0631\u0629 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u062f\u0627\u0644\u0629 \u0639\u0636\u0648 \u0627\u0644\u0637\u0628\u0627\u0639\u0629 \u0627\u0644\u062a\u064a \u062a\u0639\u0631\u0636 \u0642\u064a\u0645 \u0633\u0645\u0627\u062a \u0627\u0644\u0633\u064a\u0627\u0631\u0629.<\/p>\n<p>\u0645\u062e\u0631\u062c\u0627\u062a \u0647\u0630\u0627 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c \u0633\u062a\u0643\u0648\u0646 \u0643\u0627\u0644\u062a\u0627\u0644\u064a:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">name = kia\r\ncolor = red\r\nmaxspeed = 300\r\nmodel = 2017\r\n<\/pre>\n<p>\u064a\u0648\u0636\u062d \u0647\u0630\u0627 \u0627\u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0628\u0633\u064a\u0637 \u0644\u0640class \u0641\u064a \u0644\u063a\u0629 C++\u060c \u0648\u0627\u0644\u062a\u064a \u062a\u062a\u0636\u0645\u0646 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0648\u0627\u0644\u0633\u0644\u0648\u0643 \u0627\u0644\u0645\u062a\u0639\u0644\u0642 \u0628\u0627\u0644\u0633\u064a\u0627\u0631\u0629. \u064a\u0648\u0641\u0631 \u0627\u0644\u0640class \u0637\u0631\u0642\u064b\u0627 \u0644\u062a\u0639\u064a\u064a\u0646 \u0648\u0627\u0633\u062a\u0631\u062c\u0627\u0639 \u0627\u0644\u0633\u0645\u0627\u062a\u060c \u0648\u062a\u0639\u0632\u064a\u0632 \u0627\u0644\u062a\u063a\u0644\u064a\u0641 \u0648\u0625\u062e\u0641\u0627\u0621 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a. \u0647\u0630\u0627 \u0645\u0641\u0647\u0648\u0645 \u0623\u0633\u0627\u0633\u064a \u0641\u064a \u0627\u0644\u0628\u0631\u0645\u062c\u0629 \u0643\u0627\u0626\u0646\u064a\u0629 \u0627\u0644\u062a\u0648\u062c\u0647.<\/p>\n<p><strong>\u0645\u062b\u0627\u0644 2:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;iostream&gt;\r\nusing namespace std;\r\n\r\nclass triangle{\r\n    private: \r\n        float base;\r\n        float height;\r\n    public:\r\n        void setBase_height(float b, float h)\r\n        {\r\n            base = b;\r\n            height = h;\r\n        }\r\n        float area()\r\n        {\r\n            return 0.5 * base * height;\r\n        }\r\n        void print()\r\n        {\r\n            cout &lt;&lt; \"base = \" &lt;&lt; base &lt;&lt; endl\r\n            &lt;&lt; \"height = \" &lt;&lt; height &lt;&lt; endl\r\n            &lt;&lt; \"area = \" &lt;&lt; area() &lt;&lt; endl;\r\n        }\r\n};\r\nint main()\r\n{\r\n    triangle ob;\r\n    ob.setBase_height(5, 10);\r\n    ob.print();\r\n    return 0;\r\n}\r\n<\/pre>\n<p>\u064a\u062d\u062f\u062f \u0647\u0630\u0627 \u0627\u0644\u0631\u0645\u0632 class \u064a\u0633\u0645\u0649 triangle \u0627\u0644\u0630\u064a \u064a\u0645\u062b\u0644 \u0645\u062b\u0644\u062b\u064b\u0627. \u064a\u062d\u062a\u0648\u064a \u0627\u0644\u0640class \u0639\u0644\u0649 \u0645\u062a\u063a\u064a\u0631\u0627\u062a \u0623\u0639\u0636\u0627\u0621 \u062e\u0627\u0635\u0629 \u0644\u0642\u0627\u0639\u062f\u0629 \u0627\u0644\u0645\u062b\u0644\u062b \u0648\u0627\u0631\u062a\u0641\u0627\u0639\u0647\u060c \u0648\u064a\u0648\u0641\u0631 \u062f\u0648\u0627\u0644 \u0627\u0644\u0623\u0639\u0636\u0627\u0621 \u0644\u0625\u0639\u062f\u0627\u062f \u0647\u0630\u0647 \u0627\u0644\u0642\u064a\u0645 \u0648\u062d\u0633\u0627\u0628 \u0627\u0644\u0645\u0633\u0627\u062d\u0629 \u0648\u0637\u0628\u0627\u0639\u0629 \u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0645\u062b\u0644\u062b. \u062f\u0639\u0648\u0646\u0627 \u0646\u062d\u0644\u0644 \u0627\u0644\u0643\u0648\u062f \u062e\u0637\u0648\u0629 \u0628\u062e\u0637\u0648\u0629:<\/p>\n<ul>\n<li>\u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0640class \u0627\u0644\u0645\u0633\u0645\u0649 \u0628\u0640triangle:<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">class triangle {\r\nprivate: \r\n    float base;\r\n    float height;\r\n\r\npublic:\r\n    \/\/ Member function to set base and height\r\n    void setBase_height(float b, float h) {\r\n        base = b;\r\n        height = h;\r\n    }\r\n\r\n    \/\/ Member function to calculate the area of the triangle\r\n    float area() {\r\n        return 0.5 * base * height;\r\n    }\r\n\r\n    \/\/ Member function to print details of the triangle\r\n    void print() {\r\n        cout &lt;&lt; \"base = \" &lt;&lt; base &lt;&lt; endl\r\n             &lt;&lt; \"height = \" &lt;&lt; height &lt;&lt; endl\r\n             &lt;&lt; \"area = \" &lt;&lt; area() &lt;&lt; endl;\r\n    }\r\n};\r\n<\/pre>\n<p>- Private Members: \u064a\u062d\u062a\u0648\u064a \u0627\u0644\u0640class \u0639\u0644\u0649 \u0645\u062a\u063a\u064a\u0631\u0627\u062a \u0627\u0644\u0640private member (\u0627\u0644\u0642\u0627\u0639\u062f\u0629 \u0648\u0627\u0644\u0625\u0631\u062a\u0641\u0627\u0639)\u060c \u0648\u0627\u0644\u062a\u064a \u0644\u0627 \u064a\u0645\u0643\u0646 \u0627\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u064a\u0647\u0627 \u0625\u0644\u0627 \u062f\u0627\u062e\u0644 \u0627\u0644\u0640class.<\/p>\n<p>- Public Members: \u064a\u0648\u0641\u0631 \u0627\u0644\u0640class \u062f\u0648\u0627\u0644 public member (setBase_height, area, \u0648print) \u0644\u062a\u0639\u064a\u064a\u0646 \u0627\u0644\u0642\u0627\u0639\u062f\u0629 \u0648\u0627\u0644\u0627\u0631\u062a\u0641\u0627\u0639\u060c \u0648\u062d\u0633\u0627\u0628 \u0627\u0644\u0645\u0633\u0627\u062d\u0629\u060c \u0648\u0637\u0628\u0627\u0639\u0629 \u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0645\u062b\u0644\u062b.<\/p>\n<ul>\n<li>\u0627\u0644\u062f\u0627\u0644\u0629 \u0627\u0644\u0631\u0626\u064a\u0633\u0629 main:<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">int main() {\r\n    triangle ob;\r\n\r\n    \/\/ Setting base and height of the triangle\r\n    ob.setBase_height(5, 10);\r\n\r\n    \/\/ Printing the details of the triangle\r\n    ob.print();\r\n\r\n    return 0;\r\n}\r\n<\/pre>\n<p>- \u0625\u0646\u0634\u0627\u0621 \u0627\u0644\u0643\u0627\u0626\u0646 Object : \u064a\u062a\u0645 \u0625\u0646\u0634\u0627\u0621 \u0643\u0627\u0626\u0646 ob \u0645\u0646 \u0627\u0644\u0646\u0648\u0639 triangle.<\/p>\n<p>- \u0636\u0628\u0637 \u0627\u0644\u0642\u0627\u0639\u062f\u0629 \u0648\u0627\u0644\u0627\u0631\u062a\u0641\u0627\u0639: \u064a\u062a\u0645 \u0627\u0633\u062a\u062f\u0639\u0627\u0621 \u062f\u0627\u0644\u0629 \u0627\u0644\u0639\u0636\u0648 setBase_height \u0644\u062a\u0639\u064a\u064a\u0646 \u0627\u0644\u0642\u0627\u0639\u062f\u0629 \u0639\u0644\u0649 5 \u0648\u0627\u0644\u0627\u0631\u062a\u0641\u0627\u0639 \u0639\u0644\u0649 10 \u0644\u0644\u0645\u062b\u0644\u062b.<\/p>\n<p>- \u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0637\u0628\u0627\u0639\u0629: \u064a\u062a\u0645 \u0627\u0633\u062a\u062f\u0639\u0627\u0621 \u062f\u0627\u0644\u0629 \u0639\u0636\u0648 \u0627\u0644\u0637\u0628\u0627\u0639\u0629 \u0644\u0637\u0628\u0627\u0639\u0629 \u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0645\u062b\u0644\u062b \u0628\u0645\u0627 \u0641\u064a \u0630\u0644\u0643 \u0627\u0644\u0642\u0627\u0639\u062f\u0629 \u0648\u0627\u0644\u0627\u0631\u062a\u0641\u0627\u0639 \u0648\u0627\u0644\u0645\u0633\u0627\u062d\u0629 \u0627\u0644\u0645\u062d\u0633\u0648\u0628\u0629.<\/p>\n<p>\u0645\u062e\u0631\u062c\u0627\u062a \u0647\u0630\u0627 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c \u0633\u062a\u0643\u0648\u0646 \u0643\u0627\u0644\u062a\u0627\u0644\u064a:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">base = 5\r\nheight = 10\r\narea = 25\r\n<\/pre>\n<p>\u064a\u0648\u0636\u062d \u0647\u0630\u0627 \u0627\u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0623\u0633\u0627\u0633\u064a \u0644\u0640class \u0641\u064a \u0644\u063a\u0629 C++ \u0644\u062a\u0645\u062b\u064a\u0644 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u0645\u062a\u0639\u0644\u0642\u0629 \u0628\u0627\u0644\u0645\u062b\u0644\u062b \u0648\u0645\u0639\u0627\u0644\u062c\u062a\u0647\u0627. \u064a\u0642\u0648\u0645 \u0627\u0644\u0640class \u0628\u062a\u063a\u0644\u064a\u0641 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0648\u0627\u0644\u0633\u0644\u0648\u0643 \u0627\u0644\u0645\u062a\u0639\u0644\u0642 \u0628\u0627\u0644\u0645\u062b\u0644\u062b\u060c \u0645\u0645\u0627 \u064a\u0639\u0632\u0632 \u0627\u0644\u062a\u063a\u0644\u064a\u0641 \u0648\u064a\u062c\u0639\u0644 \u0627\u0644\u0643\u0648\u062f \u0623\u0643\u062b\u0631 \u062a\u0646\u0638\u064a\u0645\u0627\u064b \u0648\u0642\u0627\u0628\u0644\u064a\u0629 \u0644\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645. \u064a\u0642\u0648\u0645 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c \u0628\u062d\u0633\u0627\u0628 \u0648\u0639\u0631\u0636 \u0645\u0633\u0627\u062d\u0629 \u0627\u0644\u0645\u062b\u0644\u062b \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u062f\u0648\u0627\u0644 \u0627\u0644\u0623\u0639\u0636\u0627\u0621 \u0627\u0644\u0645\u062a\u0648\u0641\u0631\u0629.<\/p>","protected":false},"excerpt":{"rendered":"<p>What is a Class? In C++, a class is a user-defined data type that encapsulates data and the functions that operate on that data. It serves as a blueprint for creating objects, which are instances of the class. Imagine a class as a template that defines the structure and behavior of objects. To declare a [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"parent":4291,"menu_order":41,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-4294","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/adelnasim.com\/ar\/wp-json\/wp\/v2\/docs\/4294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adelnasim.com\/ar\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/adelnasim.com\/ar\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/adelnasim.com\/ar\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adelnasim.com\/ar\/wp-json\/wp\/v2\/comments?post=4294"}],"version-history":[{"count":8,"href":"https:\/\/adelnasim.com\/ar\/wp-json\/wp\/v2\/docs\/4294\/revisions"}],"predecessor-version":[{"id":10429,"href":"https:\/\/adelnasim.com\/ar\/wp-json\/wp\/v2\/docs\/4294\/revisions\/10429"}],"up":[{"embeddable":true,"href":"https:\/\/adelnasim.com\/ar\/wp-json\/wp\/v2\/docs\/4291"}],"wp:attachment":[{"href":"https:\/\/adelnasim.com\/ar\/wp-json\/wp\/v2\/media?parent=4294"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/adelnasim.com\/ar\/wp-json\/wp\/v2\/doc_tag?post=4294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}