{"id":10275,"date":"2020-10-06T16:48:20","date_gmt":"2020-10-06T13:18:20","guid":{"rendered":"https:\/\/maktabkhooneh.org\/mag\/?p=10275"},"modified":"2026-03-18T18:52:24","modified_gmt":"2026-03-18T15:22:24","slug":"what-is-the-importance-of-object-oriented-programming-in-c-plus-plus","status":"publish","type":"post","link":"https:\/\/maktabkhooneh.org\/mag\/what-is-the-importance-of-object-oriented-programming-in-c-plus-plus\/","title":{"rendered":"\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u062f\u0631 c++ \u0686\u0647 \u0627\u0647\u0645\u06cc\u062a\u06cc \u062f\u0627\u0631\u062f\u061f"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><span style=\"font-size: 14px;\">\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u062f\u0631 c++<\/span><\/h2>\n\n\n\n<p><span style=\"font-size: 14px;\">C++ \u06cc\u06a9 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u062d\u0628\u0648\u0628 \u0627\u0633\u062a. \u0627\u06cc\u0646 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u0631\u0627\u06cc\u0627\u0646\u0647 \u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc c++ \u06cc\u06a9 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u0627\u0633\u062a \u0648 \u0628\u0631\u062e\u06cc \u0627\u0632 \u0645\u0641\u0627\u0647\u06cc\u0645 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u062c\u062f\u06cc\u062f \u0628\u0627\u0634\u062f. \u0628\u0631\u0627\u06cc \u0622\u0645\u0648\u062e\u062a\u0646 \u0628\u06cc\u0634\u062a\u0631 \u0627\u06cc\u0646 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0645\u0631\u0648\u0631 \u06a9\u0631\u062f \u0648 \u062a\u0645\u0631\u06cc\u0646 \u0646\u0645\u0648\u062f. \u062f\u0631 \u0627\u062f\u0627\u0645\u0647 <strong>\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u062f\u0631 c++<\/strong> \u0631\u0627 \u0628\u0647\u062a\u0631 \u0645\u06cc\u200c\u0634\u0646\u0627\u0633\u06cc\u0645.<\/span><\/p>\n\n\n\n<p><span style=\"font-size: 14px;\">\u0627\u0632 \u0633\u0648\u06cc \u062f\u06cc\u06af\u0631 \u0648\u06cc\u0698\u06af\u06cc\u200c\u0647\u0627\u06cc \u062f\u06cc\u06af\u0631 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc c++ \u06a9\u0631\u0627\u0633 \u067e\u0644\u062a\u0641\u0631\u0645 \u0628\u0648\u062f\u0646 \u0622\u0646 \u0627\u0633\u062a \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0632\u0628\u0627\u0646\u200c\u0647\u0627\u06cc\u06cc \u0628\u0627 \u06a9\u0627\u0631\u0627\u06cc\u06cc \u0628\u0627\u0644\u0627 \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0628\u0627\u0634\u062f. \u0627\u06cc\u0646 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u06a9\u0646\u062a\u0631\u0644 \u0632\u06cc\u0627\u062f\u06cc \u0628\u0631 \u0645\u0646\u0627\u0628\u0639 \u0633\u06cc\u0633\u062a\u0645 \u0648 \u062d\u0627\u0641\u0638\u0647 \u0628\u0647 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u0627\u0646 \u0648 \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u062f. \u062f\u0631 \u0633\u0627\u0644\u0647\u0627\u06cc \u06f2\u06f0\u06f1\u06f1\u060c \u06f2\u06f0\u06f1\u06f4 \u0648 \u06f2\u06f0\u06f1\u06f7 \u0627\u06cc\u0646 \u0632\u0628\u0627\u062a \u0686\u0646\u062f \u0628\u0627\u0631 \u0628\u0647 \u0631\u0648\u0632 \u0634\u062f\u0647 \u0627\u0633\u062a.<\/span><\/p>\n\n\n\n<p><span style=\"font-size: 14px;\">\u0627\u0632 \u062c\u0645\u0644\u0647 \u062f\u0644\u06cc\u0644\u200c\u0647\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc c++ \u0622\u0646 \u0627\u0633\u062a \u06a9\u0647 \u0633\u0627\u062e\u062a\u0627\u0631 \u0631\u0648\u0634\u0646\u06cc \u0628\u0647 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627 \u062f\u0627\u062f\u0647 \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f \u0627\u0632 \u06a9\u062f\u0647\u0627 \u0631\u0627 \u0641\u0631\u0627\u0647\u0645 \u0645\u06cc\u200c\u0633\u0627\u0632\u062f \u0648 \u0628\u0647 \u0627\u06cc\u0646 \u0633\u0628\u0628 \u06a9\u0627\u0647\u0634 \u0647\u0632\u06cc\u0646\u0647\u200c\u0647\u0627 \u0631\u0627 \u0628\u0647 \u0647\u0645\u0631\u0627\u0647 \u062f\u0627\u0631\u062f. \u0627\u06cc\u0646 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc portable \u0627\u0633\u062a \u0648 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0627\u0632 \u0622\u0646 \u0628\u0631\u0627\u06cc \u062a\u0648\u0633\u0639\u0647 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0628\u0631\u0627\u06cc \u0686\u0646\u062f \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 \u0633\u0627\u0632\u06af\u0627\u0631 \u0634\u0648\u0646\u062f.<\/span><\/p>\n\n\n<div class=\"jet-listing-grid--50121\" style=\"\"><div class=\"jet-listing-dynamic-field-block zht-maktab-khooneh-course cb-fb2qc30r\"data-is-block=\"jet-engine\/dynamic-field\"><div class=\"jet-listing-dynamic-field__content\" >\n<div class=\"course-card\">\n    <div class=\"course-card-img\">\n        <img decoding=\"async\" \n            data-src=\"https:\/\/media1.maktabkhooneh.org\/CACHE\/images\/courses\/images\/\u06a9\u0627\u0631\u062a_\u062f\u0631\u0633_\u0622\u0645\u0648\u0632\u0634_\u0628\u0631\u0646\u0627\u0645\u0647_\u0646\u0648\u06cc\u0633\u06cc_C_1403-08-16-164732086\/19116302f12114bd5cd9d303241844d7.webp?expire=4893471932&#038;token=795ca8a0bee29fd5c46e4e2015157d31&#038;md5=eVyooL7in9XEbk4gFRV9MQ==\" \n            alt=\"\u0622\u0645\u0648\u0632\u0634 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627 \u0632\u0628\u0627\u0646 C\" \n            title=\"\u0622\u0645\u0648\u0632\u0634 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627 \u0632\u0628\u0627\u0646 C\" \n            width=\"100%\" \n            height=\"auto\"\n           \n         src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\">\n    <\/div>\n\n    <div class=\"course-details\">\n        <a href=\"https:\/\/maktabkhooneh.org\/course\/425-%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87-%D9%86%D9%88%DB%8C%D8%B3%DB%8C-%D8%B2%D8%A8%D8%A7%D9%86-c-mk425\/\" class=\"course-title\" target=\"_blank\" rel=\"noopener noreferrer\">\n            \u0622\u0645\u0648\u0632\u0634 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627 \u0632\u0628\u0627\u0646 C        <\/a>\n\n        <div class=\"course-price\">\n            \n                <span class=\"real-price\">\n                                            \u06f1,\u06f1\u06f9\u06f9,\u06f0\u06f0\u06f0                                    <\/span>\n\n                <span>\n                    <span class=\"discounted-price\">\n                        \u06f7\u06f1\u06f9,\u06f4\u06f0\u06f0                    <\/span>\n                    <span class=\"price-currency\">\u062a\u0648\u0645\u0627\u0646<\/span>\n                <\/span>\n\n                                    <div class=\"discount-percentage\">\n                        \u06f4\u06f0%                    <\/div>\n                \n                    <\/div>\n        <button class=\"course-cta-button\" data-course-url=\"https:\/\/maktabkhooneh.org\/course\/425-%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87-%D9%86%D9%88%DB%8C%D8%B3%DB%8C-%D8%B2%D8%A8%D8%A7%D9%86-c-mk425\/\">\n            \u0645\u0634\u0627\u0647\u062f\u0647 \u0648 \u062e\u0631\u06cc\u062f        <\/button>\n    <\/div>\n<\/div>\n<\/div><\/div><\/div>\n\n\n<p><span style=\"font-size: 14px;\">&nbsp;<\/span><span style=\"font-size: 14px;\">\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0622\u0646 \u0622\u0633\u0627\u0646 \u0627\u0633\u062a \u0648 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0633\u0631\u06af\u0631\u0645\u200c\u06a9\u0646\u0646\u062f\u0647 \u0646\u06cc\u0632 \u0628\u0627\u0634\u062f. \u0627\u06cc\u0646 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0628\u0647 \u0632\u0628\u0627\u0646\u0647\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc c# \u0648 \u062c\u0627\u0648\u0627 \u0646\u0632\u062f\u06cc\u06a9 \u0627\u0633\u062a. \u0644\u0630\u0627 \u0627\u0645\u06a9\u0627\u0646 \u062a\u063a\u06cc\u06cc\u0631 \u06a9\u062f \u0628\u0647 \u0633\u0627\u06cc\u0631 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc \u0645\u0634\u0627\u0628\u0647 \u0631\u0627 \u0641\u0631\u0627\u0647\u0645 \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"font-size: 14px;\">\u0634\u0631\u0648\u0639 \u0632\u0628\u0627\u0646 C++<\/span><\/h3>\n\n\n\n<p><span style=\"font-size: 14px;\">\u0628\u0631\u0627\u06cc \u0634\u0631\u0648\u0639 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0628\u0631\u0646\u0627\u0645\u0647 c++ \u062f\u0648 \u0645\u0648\u0631\u062f \u0631\u0627 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u06cc\u062f:<\/span><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><span style=\"font-size: 14px;\">\u06cc\u06a9 \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 \u0645\u062a\u0646 \u0645\u0627\u0646\u0646\u062f \u062f\u0641\u062a\u0631\u0686\u0647 \u06cc\u0627\u062f\u062f\u0627\u0634\u062a \u0628\u0631\u0627\u06cc \u0646\u0648\u0634\u062a\u0646 \u06a9\u062f c++<\/span><\/li>\n\n\n\n<li><span style=\"font-size: 14px;\">\u06cc\u06a9 \u06a9\u0627\u0645\u067e\u0627\u06cc\u0644\u0631 \u0645\u0627\u0646\u0646\u062f GCC \u0628\u0631\u0627\u06cc \u062a\u0631\u062c\u0645\u0647 \u06a9\u062f\u0647\u0627\u06cc C++ \u0628\u0647 \u0632\u0628\u0627\u0646\u06cc \u06a9\u0647 \u0628\u0631\u0627\u06cc \u06a9\u0627\u0645\u067e\u06cc\u0648\u062a\u0631 \u0642\u0627\u0628\u0644 \u0641\u0647\u0645 \u0627\u0633\u062a.<\/span><\/li>\n<\/ol>\n\n\n\n<p><span style=\"font-size: 14px;\">\u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0632\u0628\u0627\u0646 C++ \u0646\u06cc\u0627\u0632\u0645\u0646\u062f \u0622\u0646 \u0647\u0633\u062a\u06cc\u0645 \u06a9\u0647 \u06a9\u0627\u0645\u067e\u0627\u06cc\u0644\u0631 \u0645\u0631\u0628\u0648\u0637\u0647 \u0646\u0635\u0628 \u0634\u062f\u0647 \u0628\u0627\u0634\u062f. \u0628\u0627 \u0627\u06cc\u0646 \u0641\u0631\u0636 \u0628\u0647 \u062f\u0646\u0628\u0627\u0644 \u0622\u0645\u0648\u0632\u0634 <strong>\u0628\u0631\u0646\u0627\u0645\u0647 \u200c\u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u062f\u0631 C++<\/strong> \u062e\u0648\u0627\u0647\u06cc\u0645 \u0631\u0641\u062a. \u0627\u0645\u0627 \u0642\u0628\u0644 \u0627\u0632 \u0622\u0646 \u0628\u0627\u06cc\u062f \u0628\u06cc\u0627\u0645\u0648\u0632\u06cc\u0645 \u06a9\u0647 <strong>\u0628\u0631\u0646\u0627\u0645\u0647\u200c \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u062f\u0631 C++<\/strong> \u0686\u06cc\u0633\u062a\u061f \u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u0628\u0627\u06cc\u062f \u0648\u0627\u0631\u062f \u06a9\u0644\u0627\u0633\u200c\u0647\u0627 \u0634\u062f\u0647 \u0648 \u0628\u0627 \u0645\u0641\u0627\u0647\u06cc\u0645 \u0622\u0646\u0647\u0627 \u0622\u0634\u0646\u0627 \u0634\u0648\u06cc\u0645. \u062a\u0627\u0628\u0639 \u0633\u0627\u0632\u0646\u062f\u0647 \u06a9\u0644\u0627\u0633 \u0631\u0627 \u0628\u0634\u0646\u0627\u0633\u06cc\u0645 \u0648 \u0628\u0627 \u062a\u0627\u0628\u0639 \u0639\u0636\u0648 \u062e\u0635\u0648\u0635\u06cc \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc\u200c\u06af\u0631\u0627 \u0622\u0634\u0646\u0627 \u0634\u0648\u06cc\u0645.<\/span><\/p>\n\n\n<div class=\"jet-listing-grid--50121\" style=\"\"><div class=\"jet-listing-dynamic-field-block zht-maktab-khooneh-course cb-fb2qc30r\"data-is-block=\"jet-engine\/dynamic-field\"><div class=\"jet-listing-dynamic-field__content\" >\n<div class=\"course-card\">\n    <div class=\"course-card-img\">\n        <img decoding=\"async\" \n            data-src=\"https:\/\/media1.maktabkhooneh.org\/CACHE\/images\/courses\/images\/bazargan4661436601033_1403-08-16-165213140\/0d1ab05c76877c420ea78ce3e72f8b8b.webp?expire=4893471932&#038;token=50be3d4a20c26001e8fde3c338043916&#038;md5=UL49SiDCYAHo_ePDOAQ5Fg==\" \n            alt=\"\u0627\u0635\u0648\u0644 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc C \u0648 ++C\" \n            title=\"\u0627\u0635\u0648\u0644 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc C \u0648 ++C\" \n            width=\"100%\" \n            height=\"auto\"\n           \n         src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\">\n    <\/div>\n\n    <div class=\"course-details\">\n        <a href=\"https:\/\/maktabkhooneh.org\/course\/%D8%A7%D8%B5%D9%88%D9%84-%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87-%D9%86%D9%88%DB%8C%D8%B3%DB%8C-c-%D9%88-c-mk68\/\" class=\"course-title\" target=\"_blank\" rel=\"noopener noreferrer\">\n            \u0627\u0635\u0648\u0644 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc C \u0648 ++C        <\/a>\n\n        <div class=\"course-price\">\n            \n                <span class=\"free-price\">\u0631\u0627\u06cc\u06af\u0627\u0646<\/span>\n\n                    <\/div>\n        <button class=\"course-cta-button\" data-course-url=\"https:\/\/maktabkhooneh.org\/course\/%D8%A7%D8%B5%D9%88%D9%84-%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87-%D9%86%D9%88%DB%8C%D8%B3%DB%8C-c-%D9%88-c-mk68\/\">\n            \u0645\u0634\u0627\u0647\u062f\u0647        <\/button>\n    <\/div>\n<\/div>\n<\/div><\/div><\/div>\n\n\n<p><span style=\"font-size: 14px;\">\u00a0\u06a9\u0633\u0627\u0646\u06cc \u06a9\u0647 \u062f\u0631 \u062d\u0648\u0632\u0647 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0641\u0639\u0627\u0644\u06cc\u062a \u062f\u0627\u0631\u0646\u062f \u0628\u0627 \u0648\u0627\u0698\u0647 OOP \u0645\u062e\u0641\u0641 \u0639\u0628\u0627\u0631\u062a Object-Oriented Programming \u0622\u0634\u0646\u0627 \u0647\u0633\u062a\u0646\u062f. \u0627\u06cc\u0646 \u06a9\u0644\u0645\u0647 \u0647\u0645\u0627\u0646 \u0686\u06cc\u0632\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0622\u0646 \u0631\u0627 <strong>\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u062f\u0631 C++<\/strong> \u0645\u06cc\u200c\u0646\u0627\u0645\u06cc\u0645. \u0627\u06cc\u0646 \u0646\u0648\u0639 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0628\u0631 \u062e\u0644\u0627\u0641 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0631\u0648\u06cc\u0647\u200c\u0627\u06cc \u062f\u0631 \u0645\u0648\u0631\u062f \u0627\u06cc\u062c\u0627\u062f \u0627\u0634\u06cc\u0627\u06cc\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0647\u0645 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u062f\u0627\u062f\u0647 \u0628\u0627\u0634\u0646\u062f \u0648 \u0647\u0645 \u0634\u0627\u0645\u0644 \u062a\u0648\u0627\u0628\u0639 \u0645\u06cc\u200c\u0634\u0648\u062f. \u06cc\u0639\u0646\u06cc \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc\u200c\u06af\u0631\u0627 \u0628\u0627 \u062f\u0633\u062a\u0647\u200c\u0647\u0627 \u0648 \u06af\u0631\u0648\u0647\u200c\u0647\u0627 \u062f\u0631 \u0642\u0627\u0644\u0628 \u0627\u0646\u0648\u0627\u0639 \u062a\u0648\u0627\u0628\u0639 \u062f\u0631 \u0627\u0631\u062a\u0628\u0627\u0637 \u0647\u0633\u062a\u06cc\u0645. \u0627\u0632 \u062c\u0645\u0644\u0647 \u0645\u0632\u06cc\u062a\u0647\u0627\u06cc <strong>\u0628\u0631\u0646\u0627\u0645\u0647\u200c \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u062f\u0631 c++<\/strong>\u00a0 \u0648 \u0634\u0627\u06cc\u062f \u062f\u0631 \u062a\u0645\u0627\u0645 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0627\u06cc\u0646 \u0642\u0627\u0628\u0644\u06cc\u062a \u0631\u0627 \u062f\u0627\u0631\u0646\u062f \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0628\u0647 \u0645\u0648\u0627\u0631\u062f \u0632\u06cc\u0631 \u0627\u0634\u0627\u0631\u0647 \u0646\u0645\u0648\u062f:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-size: 14px;\">\u0633\u0631\u0639\u062a \u062f\u0631 \u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647<\/span><\/li>\n\n\n\n<li><span style=\"font-size: 14px;\">\u0641\u0631\u0627\u0647\u0645 \u0622\u0648\u0631\u062f\u0646 \u0633\u0627\u062e\u062a\u0627\u0631 \u0631\u0648\u0634\u0646 \u0628\u0631\u0627\u06cc \u0646\u0631\u0645 \u0627\u0641\u0632\u0627\u0631<\/span><\/li>\n\n\n\n<li><span style=\"font-size: 14px;\">\u0627\u0635\u0644\u0627\u062d \u0648 \u0627\u0634\u06a9\u0627\u0644\u200c\u0632\u0627\u06cc\u06cc \u0627\u0632 \u06a9\u062f\u0647\u0627\u06cc \u0646\u0648\u0634\u062a\u0647 \u0634\u062f\u0647 \u0622\u0633\u0627\u0646 \u0627\u0633\u062a \u0648 \u0627\u0632 \u062a\u06a9\u0631\u0627\u0631 \u0645\u06a9\u0631\u0631\u0627\u062a \u062f\u0631 \u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc \u062c\u0644\u0648\u06af\u06cc\u0631\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0627\u06cc\u0646 \u0641\u0631\u0622\u06cc\u0646\u062f \u0631\u0627 DRY \u0646\u06af\u0647\u062f\u0627\u0634\u062a\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0645\u06cc\u200c\u0646\u0627\u0645\u0646\u062f \u06a9\u0647 \u0645\u062e\u0641\u0641 Don&#8217;t Repeat Yourself \u0627\u0633\u062a.<\/span><\/li>\n\n\n\n<li><span style=\"font-size: 14px;\">\u0627\u0645\u06a9\u0627\u0646 \u0627\u06cc\u062c\u0627\u062f \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc \u06a9\u0627\u0645\u0644 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f \u0628\u0627 \u06a9\u062f \u06a9\u0645\u062a\u0631 \u0648 \u0632\u0645\u0627\u0646 \u062a\u0648\u0633\u0639\u0647 \u06a9\u0648\u062a\u0627\u0647\u062a\u0631<\/span><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"font-size: 14px;\">\u06a9\u0644\u0627\u0633 \u0648 \u0634\u06cc \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u062f\u0631 c++<\/span><\/h3>\n\n\n\n<p><span style=\"font-size: 14px;\">\u06a9\u0644\u0627\u0633\u200c\u0647\u0627 \u0648 \u0627\u0634\u06cc\u0627 \u062f\u0648 \u062c\u0646\u0628\u0647 \u0627\u0635\u0644\u06cc \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc\u200c\u06af\u0631\u0627 \u0647\u0633\u062a\u0646\u062f. \u062f\u0631 \u062a\u0635\u0648\u06cc\u0631 \u0632\u06cc\u0631 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u062a\u0641\u0627\u0648\u062a \u0627\u06cc\u0646 \u062f\u0648 \u0631\u0627 \u0628\u0647 \u0648\u0636\u0648\u062d \u062f\u0631\u06a9 \u0646\u0645\u0648\u062f:<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" width=\"921\" height=\"261\" src=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2020\/10\/1-1.png\" alt=\"\u06a9\u0644\u0627\u0633 \u0648 \u0634\u06cc \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u062f\u0631 c++\" class=\"wp-image-10276\" title=\"\" srcset=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2020\/10\/1-1.png 921w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2020\/10\/1-1-300x85.png.webp 300w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2020\/10\/1-1-768x218.png.webp 768w\" sizes=\"(max-width: 921px) 100vw, 921px\" \/><figcaption><\/figcaption><\/figure>\n\n\n\n<p><span style=\"font-size: 14px;\"><\/span><span style=\"font-size: 14px;\">\u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u06af\u0648\u06cc \u0627\u0634\u06cc\u0627 \u0628\u0648\u062f\u0647 \u0648 \u06cc\u06a9 \u0634\u06cc \u06cc\u06a9 \u0646\u0645\u0648\u0646\u0647 \u0627\u0632 \u0627\u062c\u0632\u0627\u06cc \u06a9\u0644\u0627\u0633 \u0627\u0633\u062a. \u0648\u0642\u062a\u06cc \u0627\u0634\u06cc\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u0646\u0641\u0631\u062f \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u062a\u0645\u0627\u0645 \u0645\u062a\u063a\u06cc\u0631\u0647\u0627 \u0648 \u062a\u0648\u0627\u0628\u0639 \u0631\u0627 \u0627\u0632 \u06a9\u0644\u0627\u0633 \u062e\u0648\u062f \u0628\u0647 \u0627\u0631\u062b \u0645\u06cc\u200c\u0628\u0631\u0646\u062f. \u062f\u0631 \u0627\u062f\u0627\u0645\u0647 \u0628\u0627 \u0645\u0641\u0627\u0647\u06cc\u0645 \u0628\u06cc\u0634\u062a\u0631\u06cc \u062f\u0631 \u0627\u06cc\u0646 \u062e\u0635\u0648\u0635 \u0648 \u0645\u062b\u0627\u0644\u200c\u0647\u0627\u06cc \u0645\u062a\u0646\u0648\u0639 \u0622\u0634\u0646\u0627 \u062e\u0648\u0627\u0647\u06cc\u0645 \u0634\u062f.<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span style=\"font-size: 14px;\">\u06a9\u0644\u0627\u0633\u0647\u0627 \u0648 \u0627\u0634\u06cc\u0627 \u062f\u0631 c++<\/span><\/h4>\n\n\n\n<p><span style=\"font-size: 14px;\">C++ \u06cc\u06a9 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc\u200c\u06af\u0631\u0627 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f. \u0647\u0645\u0647 \u0686\u06cc\u0632 \u062f\u0631 c++ \u0647\u0645\u0631\u0627\u0647 \u0628\u0627 \u0648\u06cc\u0698\u06af\u06cc\u200c\u0647\u0627 \u0648 \u0631\u0648\u0634\u200c\u0647\u0627\u06cc \u0622\u0646 \u0628\u0627 \u06a9\u0644\u0627\u0633 \u0648 \u0627\u0634\u06cc\u0627\u0621 \u0645\u0631\u062a\u0628\u0637 \u0627\u0633\u062a. \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u0645\u062b\u0627\u0644 \u0633\u0627\u062f\u0647 \u062f\u0631 \u0632\u0646\u062f\u06af\u06cc \u0645\u0639\u0645\u0648\u0644\u06cc \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0628\u0647 \u0627\u06cc\u0646 \u0645\u062b\u0627\u0644 \u0627\u0634\u0627\u0631\u0647 \u06a9\u0631\u062f \u06a9\u0647 \u0645\u0627\u0634\u06cc\u0646 \u06cc\u06a9 \u0634\u06cc \u0627\u0633\u062a. \u0627\u06cc\u0646 \u062e\u0648\u062f\u0631\u0648 \u062f\u0627\u0631\u0627\u06cc \u062e\u0635\u0648\u0635\u06cc\u0627\u062a\u06cc \u0645\u0627\u0646\u0646\u062f \u0648\u0632\u0646\u060c \u0631\u0646\u06af \u0648 \u062e\u0635\u0648\u0635\u06cc\u0627\u062a \u062f\u06cc\u06af\u0631 \u0627\u0633\u062a.<\/span><\/p>\n\n\n<div class=\"jet-listing-grid--50192\" style=\"\"><style><\/style><section class=\"zht-related-post\" itemscope=\"\" itemtype=\"https:\/\/schema.org\/Article\" role=\"region\"\n  aria-label=\"Related article\">\n  <div class=\"zht-related-post-section-label\">\n    \u0645\u0637\u0627\u0644\u0628 \u0645\u0631\u062a\u0628\u0637\n  <\/div>\n  <img decoding=\"async\" width=\"300\" height=\"169\" data-src=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2020\/08\/6038586442907648-300x169.png.webp\" class=\"attachment-medium size-medium wp-post-image lazyload\" alt=\"\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc ++C \u0628\u0647 \u0686\u0647 \u0635\u0648\u0631\u062a \u0627\u0633\u062a\" data-srcset=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2020\/08\/6038586442907648-300x169.png.webp 300w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2020\/08\/6038586442907648-1024x576.png.webp 1024w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2020\/08\/6038586442907648-768x432.png.webp 768w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2020\/08\/6038586442907648-1536x864.png.webp 1536w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2020\/08\/6038586442907648.png 1920w\" data-sizes=\"(max-width: 300px) 100vw, 300px\" title=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 300px; --smush-placeholder-aspect-ratio: 300\/169;\">\n  <a href=\"https:\/\/maktabkhooneh.org\/mag\/examples-of-c-programming-and-sample-questions\/\" class=\"zht-related-post-title\"\n    itemprop=\"headline\" target=\"_blank\">\u0645\u062b\u0627\u0644 \u0647\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc c++\u200e \u0648 \u0646\u0645\u0648\u0646\u0647 \u0633\u0648\u0622\u0644\u0627\u062a \u0622\u0646<\/a>\n<\/section><\/div>\n\n\n<p><span style=\"font-size: 14px;\">\u0631\u0627\u0646\u0646\u062f\u06af\u06cc \u0648 \u0646\u062d\u0648\u0647 \u062a\u0631\u0645\u0632 \u06af\u0631\u0641\u062a\u0646 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0631\u0648\u0634 \u0648 \u0633\u0628\u06a9 \u0628\u0647 \u062d\u0633\u0627\u0628 \u0645\u06cc\u200c\u0622\u06cc\u0646\u062f. \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0646\u06cc\u0632 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0645\u0641\u0627\u0647\u06cc\u0645 \u0631\u0627 \u0628\u0647 \u0647\u0645\u06cc\u0646 \u0633\u0627\u062f\u06af\u06cc \u0641\u0647\u0645\u06cc\u062f \u0648 \u062a\u0639\u0645\u06cc\u0645 \u062f\u0627\u062f. \u0648\u06cc\u0698\u06af\u06cc\u200c\u0647\u0627 \u0648 \u0631\u0648\u0634\u200c\u0647\u0627 \u0639\u0645\u0648\u0645\u0627 \u0645\u062a\u063a\u06cc\u0631\u0647\u0627 \u0648 \u062a\u0648\u0627\u0628\u0647 \u0645\u062a\u0639\u0644\u0642 \u0628\u0647 \u06a9\u0644\u0627\u0633 \u0647\u0633\u062a\u0646\u062f. \u0627\u06cc\u0646\u0647\u0627 \u0627\u063a\u0644\u0628 \u0627\u0639\u0636\u0627\u06cc \u06a9\u0644\u0627\u0633 \u0646\u0627\u0645\u06cc\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f. \u06a9\u0644\u0627\u0633 \u06cc\u06a9 \u0646\u0648\u0639 \u062f\u0627\u062f\u0647 \u062a\u0639\u0631\u06cc\u0641 \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 \u06a9\u0627\u0631\u0628\u0631 \u0627\u0633\u062a \u06a9\u0647 \u0627\u0632 \u0622\u0646 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u062e\u0648\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0646\u0645\u0627\u06cc\u062f \u0648 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0633\u0627\u0632\u0646\u062f\u0647 \u0634\u06cc \u06cc\u0627 \u0637\u0631\u062d \u0627\u0635\u0644\u06cc \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u0627\u0634\u06cc\u0627\u0621 \u06a9\u0627\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span style=\"font-size: 14px;\">\u0633\u0627\u062e\u062a \u06a9\u0644\u0627\u0633 \u062f\u0631 c++<\/span><\/h4>\n\n\n\n<p><span style=\"font-size: 14px;\">\u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0644\u0627\u0633 \u0646\u06cc\u0627\u0632\u0645\u0646\u062f \u06a9\u0644\u06cc\u062f \u0648\u0627\u0698\u0647 \u0645\u0631\u062a\u0628\u0637 \u0647\u0633\u062a\u06cc\u0645. \u0628\u0627 \u06cc\u06a9 \u0645\u062b\u0627\u0644 \u0633\u0627\u062e\u062a \u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u0631\u0627 \u0628\u0627 \u0647\u0645 \u0645\u0631\u0648\u0631 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 14px;\">class MyClass {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\/\/ The class\n\n&nbsp; public:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\/\/ Access specifier\n\n&nbsp; &nbsp; int myNum;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\/\/ Attribute (int variable)\n\n&nbsp; &nbsp; string myString;&nbsp; \/\/ Attribute (string variable)\n\n};<\/span><\/pre>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062f\u0631 \u0627\u06cc\u0646 \u06a9\u062f \u0646\u0648\u0634\u062a\u0647 \u0634\u062f\u0647 \u06a9\u0644\u06cc\u062f \u0648\u0627\u0698\u0647 class \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0644\u0627\u0633 MyClass \u0628\u0647 \u06a9\u0627\u0631 \u0628\u0631\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a. \u06a9\u0644\u06cc\u062f \u0648\u0627\u0698\u0647 public \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u062f\u0633\u062a\u0631\u0633 \u0645\u0634\u062e\u0635 \u06a9\u0646\u0646\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u0631\u0633 \u0634\u062f\u0646 \u0627\u0639\u0636\u0627\u06cc \u06a9\u0644\u0627\u0633 \u062d\u0627\u0631\u062c \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0628\u0647 \u06a9\u0627\u0631 \u0645\u06cc\u200c\u0631\u0648\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u06a9\u062f\u0647\u0627\u06cc \u0646\u0648\u0634\u062a\u0647 \u0634\u062f\u0647\u060c \u0645\u062a\u063a\u06cc\u0631 \u0635\u062d\u06cc\u062d myNum \u0648 \u0645\u062a\u063a\u06cc\u0631 \u0631\u0634\u062a\u0647\u200c\u0627\u06cc myString \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u0646\u062f \u06a9\u0647 \u062f\u0631\u0648\u0646 \u06a9\u0644\u0627\u0633 \u062a\u0639\u0631\u06cc\u0641 \u0634\u062f\u0647\u200c\u0627\u0646\u062f. \u0648\u0642\u062a\u06cc \u0645\u062a\u063a\u06cc\u0631\u0647\u0627 \u062f\u0631 \u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u0645\u0639\u0631\u0641\u06cc \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u0622\u0646\u0647\u0627 \u0631\u0627 \u0635\u0641\u062a \u0645\u06cc\u200c\u0646\u0627\u0645\u06cc\u0645. \u067e\u0627\u06cc\u0627\u0646 \u0647\u0631 \u06a9\u0644\u0627\u0633 \u0646\u06cc\u0632 \u0628\u0627 \u06cc\u06a9 ; \u0628\u0633\u062a\u0647 \u062e\u0648\u0627\u0647\u062f \u0634\u062f.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"font-size: 14px;\">\u0633\u0627\u062e\u062a \u06cc\u06a9 \u0634\u06cc<\/span><\/h3>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062f\u0631 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc\u200c\u06af\u0631\u0627\u06cc c++\u060c \u06cc\u06a9 \u0634\u06cc \u0627\u0632 \u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u0634\u0648\u062f. \u062f\u0631 \u0645\u062b\u0627\u0644 \u0642\u0628\u0644 \u06a9\u0644\u0627\u0633 MyClass \u0627\u06cc\u062c\u0627\u062f \u0634\u062f\u0647 \u0627\u0633\u062a. \u0644\u0630\u0627 \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u0627\u0634\u06cc\u0627\u0621 \u0627\u0632 \u0627\u06cc\u0646 \u06a9\u0644\u0627\u0633 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f. \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0634\u06cc \u0627\u0632 MyClass \u0646\u0627\u0645 \u06a9\u0644\u0627\u0633 \u0631\u0627 \u0645\u0634\u062e\u0635 \u06a9\u0646\u06cc\u062f \u0648 \u0633\u067e\u0633 \u0646\u0627\u0645 \u0622\u0646 \u0631\u0627 \u062f\u0646\u0628\u0627\u0644 \u0646\u0645\u0627\u06cc\u06cc\u062f. \u0628\u0631\u0627\u06cc \u062f\u0633\u062a\u06cc\u0627\u0628\u06cc \u0628\u0647 \u0635\u0641\u0627\u062a \u06a9\u0644\u0627\u0633 (myNum \u0648 myString) \u0627\u0632 \u0646\u0642\u0637\u0647 \u062f\u0631 \u0634\u06cc (.)&nbsp; \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0646\u0645\u0627\u06cc\u06cc\u0645. \u062f\u0631 \u0627\u06cc\u0646 \u062e\u0635\u0648\u0635 \u0628\u0647 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u062a\u0648\u062c\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 14px;\">#include &lt;iostream&gt;\n\n#include &lt;string&gt;\n\nusing namespace std;\n\n\n\n\nclass MyClass {&nbsp; &nbsp; &nbsp; &nbsp;\/\/ The class\n\n&nbsp; public:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\/\/ Access specifier\n\n&nbsp; &nbsp; int myNum;&nbsp; &nbsp; &nbsp; &nbsp; \/\/ Attribute (int variable)\n\n&nbsp; &nbsp; string myString;&nbsp; \/\/ Attribute (string variable)\n\n};\n\n\n\n\nint main() {\n\n&nbsp; MyClass myObj;&nbsp; \/\/ Create an object of MyClass\n\n\n\n\n&nbsp; \/\/ Access attributes and set values\n\n&nbsp; myObj.myNum = 15;\n\n&nbsp; myObj.myString = \"Some text\";\n\n\n\n\n&nbsp; \/\/ Print values\n\n&nbsp; cout &lt;&lt; myObj.myNum &lt;&lt; \"\\n\";&nbsp;\n\n&nbsp; cout &lt;&lt; myObj.myString;&nbsp;\n\n&nbsp; return 0;\n\n}<\/span><\/pre>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062e\u0631\u062c\u06cc \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0634\u0627\u0645\u0644 \u0645\u0648\u0627\u0631\u062f \u0632\u06cc\u0631 \u0627\u0633\u062a:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 14px;\">\u06f1\u06f5\n\nSome text<\/span><\/pre>\n\n\n\n<p><span style=\"font-size: 14px;\">\u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u0645\u0634\u0627\u0647\u062f\u0647 \u0634\u062f \u0628\u0627 \u0633\u0627\u062e\u062a \u0634\u06cc \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062e\u0631\u0648\u062c\u06cc \u0627\u0633\u062a\u062e\u0631\u0627\u062c \u06af\u0631\u062f\u06cc\u062f. \u0628\u0631\u0627\u06cc \u062a\u0641\u0647\u06cc\u0645 \u0628\u06cc\u0634\u062a\u0631 \u0628\u0627 \u0686\u0646\u062f \u0645\u062b\u0627\u0644 \u062f\u06cc\u06af\u0631\u060c \u062a\u0627\u0628\u0639 \u0648 \u0627\u0634\u06cc\u0627\u0621 \u0631\u0627 \u0628\u0627 \u0647\u0645 \u0645\u0631\u0648\u0631 \u0645\u06cc\u200c\u0646\u0645\u0627\u06cc\u06cc\u0645. \u062f\u0631 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u0645\u0634\u0627\u0647\u062f\u0647 \u062e\u0648\u0627\u0647\u062f \u0634\u062f \u06a9\u0647 \u0686\u0646\u062f \u0634\u06cc \u062f\u0631\u0648\u0646 \u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u0627\u06cc\u062c\u0627\u062f \u0634\u062f\u0647\u200c\u0627\u0646\u062f:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 14px;\">#include &lt;iostream&gt;\n\n#include &lt;string&gt;\n\nusing namespace std;\n\n\n\n\nclass Car {\n\n&nbsp; public:\n\n&nbsp; &nbsp; string brand;\n\n&nbsp; &nbsp; string model;\n\n&nbsp; &nbsp; int year;\n\n};\n\n\n\n\nint main() {\n\n&nbsp; Car carObj1;\n\n&nbsp; carObj1.brand = \"BMW\";\n\n&nbsp; carObj1.model = \"X5\";\n\n&nbsp; carObj1.year = 1999;\n\n\n\n\n&nbsp; Car carObj2;\n\n&nbsp; carObj2.brand = \"Ford\";\n\n&nbsp; carObj2.model = \"Mustang\";\n\n&nbsp; carObj2.year = 1969;\n\n\n\n\n&nbsp; cout &lt;&lt; carObj1.brand &lt;&lt; \" \" &lt;&lt; carObj1.model &lt;&lt; \" \" &lt;&lt; carObj1.year &lt;&lt; \"\\n\";\n\n&nbsp; cout &lt;&lt; carObj2.brand &lt;&lt; \" \" &lt;&lt; carObj2.model &lt;&lt; \" \" &lt;&lt; carObj2.year &lt;&lt; \"\\n\";\n\n&nbsp; return 0;\n\n}\n\n\n\n\n\u062e\u0631\u0648\u062c\u06cc \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0639\u0628\u0627\u0631\u062a \u0627\u0633\u062a \u0627\u0632:\n\nBMW X5 1999\n\nFord Mustang 1969<\/span><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"font-size: 14px;\">\u062a\u0648\u0627\u0628\u0639 \u0633\u0627\u0632\u0646\u062f\u0647 \u06a9\u0644\u0627\u0633 \u062f\u0631 c++<\/span><\/h3>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062a\u0648\u0627\u0628\u0639 \u0633\u0627\u0632\u0646\u062f\u0647 \u06a9\u0644\u0627\u0633 \u062f\u0631 C++ \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0631\u0648\u0634\u200c\u0647\u0627\u06cc \u062e\u0627\u0635\u06cc \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0628\u0647 \u0635\u0648\u0631\u062a \u0627\u062a\u0648\u0645\u0627\u062a\u06cc\u06a9 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0634\u062f\u0647 \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u0634\u06cc\u200c\u0627\u06cc \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u0634\u0648\u062f. \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u062a\u0648\u0627\u0628\u0639 \u0633\u0627\u0632\u0646\u062f\u0647 \u06a9\u0644\u0627\u0633 \u0627\u0632 \u0646\u0627\u0645 \u0645\u0634\u0627\u0628\u0647 \u0647\u0645\u0627\u0646 \u06a9\u0644\u0627\u0633 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0648\u062f\u0647 \u0648 \u0628\u0647 \u062f\u0646\u0628\u0627\u0644 \u0622\u0646 () \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc\u200c\u0646\u0645\u0627\u06cc\u06cc\u0645. \u062f\u0631 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u0628\u0627 \u0627\u06cc\u0646 \u0645\u0641\u0647\u0648\u0645 \u0622\u0634\u0646\u0627 \u062e\u0648\u0627\u0647\u06cc\u0645 \u0634\u062f:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 14px;\">#include &lt;iostream&gt;\n\nusing namespace std;\n\n\n\n\nclass MyClass {&nbsp; &nbsp; &nbsp;\/\/ The class\n\n&nbsp; public:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\/\/ Access specifier\n\n&nbsp; &nbsp; MyClass() {&nbsp; &nbsp; &nbsp;\/\/ Constructor\n\n&nbsp; &nbsp; &nbsp; cout &lt;&lt; \"Hello World!\";\n\n&nbsp; &nbsp; }\n\n};\n\n\n\n\nint main() {\n\n&nbsp; MyClass myObj;&nbsp; &nbsp; \/\/ Create an object of MyClass (this will call the constructor)\n\n&nbsp; return 0;\n\n}<\/span><\/pre>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062e\u0631\u0648\u062c\u06cc \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0639\u0628\u0627\u0631\u062a \u0627\u0633\u062a \u0627\u0632:<\/span><\/p>\n\n\n\n<p><span style=\"font-size: 14px;\">Hello World!<\/span><\/p>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062a\u0648\u0627\u0628\u0639 \u0633\u0627\u0632\u0646\u062f\u0647 \u06a9\u0644\u0627\u0633 \u0647\u0645\u0646\u0627\u0645 \u06a9\u0644\u0627\u0633 \u0628\u0648\u062f\u0647 \u0648 \u0647\u0645\u06cc\u0634\u0647 \u0628\u0647 \u0635\u0648\u0631\u062a \u0639\u0645\u0648\u0645\u06cc \u0628\u0647 \u06a9\u0627\u0631 \u0631\u0641\u062a\u0647 \u0648 \u0645\u0642\u062f\u0627\u0631 \u0628\u0627\u0632\u06af\u0634\u062a \u0646\u062e\u0648\u0627\u0647\u0646\u062f \u062f\u0627\u0634\u062a. \u062f\u0631 \u0627\u062f\u0627\u0645\u0647 \u0628\u0627 \u0647\u0645 \u067e\u0627\u0631\u0627\u0645\u062a\u0631\u0647\u0627\u06cc \u062a\u0648\u0627\u0628\u0639 \u0633\u0627\u0632\u0646\u062f\u0647 \u06a9\u0644\u0627\u0633 \u0631\u0627 \u0628\u0631\u0631\u0633\u06cc \u0645\u06cc\u200c\u0646\u0645\u0627\u06cc\u06cc\u0645.<\/span><\/p>\n\n\n<div class=\"jet-listing-grid--50192\" style=\"\"><section class=\"zht-related-post\" itemscope=\"\" itemtype=\"https:\/\/schema.org\/Article\" role=\"region\"\n  aria-label=\"Related article\">\n  <div class=\"zht-related-post-section-label\">\n    \u0645\u0637\u0627\u0644\u0628 \u0645\u0631\u062a\u0628\u0637\n  <\/div>\n  <img decoding=\"async\" width=\"300\" height=\"150\" data-src=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2020\/09\/sale_25561_primary_image_wide-100827989-large-300x150.jpg.webp\" class=\"attachment-medium size-medium wp-post-image lazyload\" alt=\"\u0622\u0634\u0646\u0627\u06cc\u06cc \u0628\u0627 \u062a\u0648\u0627\u0628\u0639 c++\" data-srcset=\"https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2020\/09\/sale_25561_primary_image_wide-100827989-large-300x150.jpg.webp 300w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/smush-webp\/2020\/09\/sale_25561_primary_image_wide-100827989-large-768x384.jpg.webp 768w, https:\/\/maktabkhooneh.org\/mag\/wp-content\/uploads\/2020\/09\/sale_25561_primary_image_wide-100827989-large.jpg 1000w\" data-sizes=\"(max-width: 300px) 100vw, 300px\" title=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 300px; --smush-placeholder-aspect-ratio: 300\/150;\">\n  <a href=\"https:\/\/maktabkhooneh.org\/mag\/familiarity-with-c-plus-plus-functions\/\" class=\"zht-related-post-title\"\n    itemprop=\"headline\" target=\"_blank\">\u0622\u0634\u0646\u0627\u06cc\u06cc \u0628\u0627 \u062a\u0648\u0627\u0628\u0639 c++<\/a>\n<\/section><\/div>\n\n\n<h3 class=\"wp-block-heading\"><span style=\"font-size: 14px;\">\u067e\u0627\u0631\u0627\u0645\u062a\u0631\u0647\u0627\u06cc \u062a\u0648\u0627\u0628\u0639 \u0633\u0627\u0632\u0646\u062f\u0647 \u06a9\u0644\u0627\u0633<\/span><\/h3>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062a\u0648\u0627\u0628\u0639 \u0633\u0627\u0632\u0646\u062f\u0647 \u06a9\u0644\u0627\u0633 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u067e\u0627\u0631\u0627\u0645\u062a\u0631\u0647\u0627\u06cc\u06cc \u0631\u0627 \u0628\u06af\u06cc\u0631\u0646\u062f. \u0627\u06cc\u0646 \u067e\u0627\u0631\u0627\u0645\u062a\u0631\u0647\u0627 \u0628\u0631\u0627\u06cc \u062a\u0646\u0638\u06cc\u0645 \u0645\u0642\u0627\u062f\u06cc\u0631 \u0627\u0648\u0644\u06cc\u0647 \u0628\u0631\u0627\u06cc \u0648\u06cc\u0698\u06af\u06cc\u200c\u0647\u0627 \u0645\u0641\u06cc\u062f \u0647\u0633\u062a\u0646\u062f. \u062f\u0631 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u06a9\u0644\u0627\u0633\u06cc \u062f\u0631 \u0646\u0638\u0631 \u06af\u0631\u0641\u062a\u0647 \u0634\u062f\u0647 \u06a9\u0647 \u0628\u0631\u062e\u06cc \u0648\u06cc\u0698\u06af\u06cc\u200c\u0647\u0627 \u0645\u0627\u0646\u0646\u062f \u0645\u0627\u0631\u06a9\u060c \u0645\u062f\u0644 \u0633\u0627\u0644 \u0648 \u0628\u0631\u062e\u06cc \u0645\u0642\u0627\u062f\u06cc\u0631 \u062f\u06cc\u06af\u0631 \u0631\u0627 \u062f\u0631 \u0646\u0638\u0631 \u06af\u0631\u0641\u062a\u0647 \u0627\u0633\u062a. \u062f\u0631 \u062f\u0627\u062e\u0644 \u0633\u0627\u0632\u0646\u062f\u0647\u060c \u0635\u0641\u0627\u062a \u0631\u0627 \u0628\u0631\u0627\u0628\u0631 \u0628\u0627 \u067e\u0627\u0631\u0627\u0645\u062a\u0631\u0647\u0627\u06cc \u0633\u0627\u0632\u0646\u062f\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u062f\u0647\u06cc\u0645. \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u0633\u0627\u0632\u0646\u062f\u0647 \u06a9\u0644\u0627\u0633 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0645\u06cc\u200c\u0634\u0648\u062f\u060c \u067e\u0627\u0631\u0627\u0645\u062a\u0631\u0647\u0627 \u0628\u0647 \u0633\u0627\u0632\u0646\u062f\u0647 \u06a9\u0644\u0627\u0633 \u0645\u0646\u062a\u0642\u0644 \u0634\u062f\u0647 \u0648 \u0645\u0642\u0627\u062f\u06cc\u0631 \u0628\u0627 \u062a\u0648\u062c\u0647 \u0628\u0647 \u0648\u06cc\u0698\u06af\u06cc\u200c\u0647\u0627 \u0628\u0627 \u0647\u0645 \u0647\u0645\u0627\u0647\u0646\u06af \u0645\u06cc\u200c\u0634\u0648\u0646\u062f. \u0628\u0647 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u062a\u0648\u062c\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f \u0648 \u062e\u0631\u0648\u062c\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u062f\u0631 \u0646\u0638\u0631 \u0628\u06af\u06cc\u0631\u06cc\u062f:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 14px;\">#include &lt;iostream&gt;\n\nusing namespace std;\n\n\n\n\nclass Car {&nbsp; &nbsp; &nbsp; &nbsp; \/\/ The class\n\n&nbsp; public:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/ Access specifier\n\n&nbsp; &nbsp; string brand;&nbsp; \/\/ Attribute\n\n&nbsp; &nbsp; string model;&nbsp; \/\/ Attribute\n\n&nbsp; &nbsp; int year;&nbsp; &nbsp; &nbsp; \/\/ Attribute\n\n&nbsp; &nbsp; Car(string x, string y, int z) {&nbsp; \/\/ Constructor with parameters\n\n&nbsp; &nbsp; &nbsp; brand = x;\n\n&nbsp; &nbsp; &nbsp; model = y;\n\n&nbsp; &nbsp; &nbsp; year = z;\n\n&nbsp; &nbsp; }\n\n};\n\n\n\n\nint main() {\n\n&nbsp; \/\/ Create Car objects and call the constructor with different values\n\n&nbsp; Car carObj1(\"BMW\", \"X5\", 1999);\n\n&nbsp; Car carObj2(\"Ford\", \"Mustang\", 1969);\n\n\n\n\n&nbsp; \/\/ Print values\n\n&nbsp; cout &lt;&lt; carObj1.brand &lt;&lt; \" \" &lt;&lt; carObj1.model &lt;&lt; \" \" &lt;&lt; carObj1.year &lt;&lt; \"\\n\";\n\n&nbsp; cout &lt;&lt; carObj2.brand &lt;&lt; \" \" &lt;&lt; carObj2.model &lt;&lt; \" \" &lt;&lt; carObj2.year &lt;&lt; \"\\n\";\n\n&nbsp; return 0;\n\n}<\/span><\/pre>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062e\u0631\u0648\u062c\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0639\u0628\u0627\u0631\u062a \u0627\u0633\u062a \u0627\u0632:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 14px;\">BMW X5 1999\n\nFord Mustang 1969<\/span><\/pre>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062f\u0642\u06cc\u0642\u0627 \u0628\u0647 \u0645\u0627\u0646\u0646\u062f \u062a\u0648\u0627\u0628\u0639 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0633\u0627\u0632\u0646\u062f\u0647 \u06a9\u0644\u0627\u0633 \u0631\u0627 \u062e\u0627\u0631\u062c \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0646\u06cc\u0632 \u062a\u0639\u0631\u06cc\u0641 \u0646\u0645\u0648\u062f. \u0627\u0628\u062a\u062f\u0627 \u0633\u0627\u0632\u0646\u062f\u0647 \u0631\u0627 \u062f\u0631 \u062f\u0627\u062e\u0644 \u06a9\u0644\u0627\u0633 \u0645\u0639\u0631\u0641\u06cc \u0645\u06cc\u200c\u0646\u0645\u0627\u06cc\u06cc\u0645 \u0648 \u0633\u067e\u0633 \u0622\u0646 \u0631\u0627 \u062e\u0627\u0631\u062c \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0628\u0627 \u0645\u0634\u062e\u0635 \u06a9\u0631\u062f\u0646 \u0646\u0627\u0645 \u06a9\u0644\u0627\u0633 \u062a\u0639\u0631\u06cc\u0641 \u0646\u0645\u0648\u062f\u0647 \u0648 \u0628\u0647 \u062f\u0646\u0628\u0627\u0644 \u0622\u0646\u060c \u0639\u0645\u0644\u06af\u0631 \u067e\u0633 \u0632\u0645\u06cc\u0646\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u0646\u0645\u0627\u06cc\u06cc\u062f. \u0628\u0647 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u062f\u0631 \u0627\u06cc\u0646 \u062e\u0635\u0648\u0635 \u062a\u0648\u062c\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 14px;\">#include &lt;iostream&gt;\n\nusing namespace std;\n\n\n\n\nclass Car {&nbsp; &nbsp; &nbsp; &nbsp; \/\/ The class\n\n&nbsp; public:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/ Access specifier\n\n&nbsp; &nbsp; string brand;&nbsp; \/\/ Attribute\n\n&nbsp; &nbsp; string model;&nbsp; \/\/ Attribute\n\n&nbsp; &nbsp; int year;&nbsp; &nbsp; &nbsp; \/\/ Attribute\n\n&nbsp; &nbsp; Car(string x, string y, int z); \/\/ Constructor declaration\n\n};\n\n\n\n\n\/\/ Constructor definition outside the class\n\nCar::Car(string x, string y, int z) {\n\n&nbsp; brand = x;\n\n&nbsp; model = y;\n\n&nbsp; year = z;\n\n}\n\n\n\n\nint main() {\n\n&nbsp; \/\/ Create Car objects and call the constructor with different values\n\n&nbsp; Car carObj1(\"BMW\", \"X5\", 1999);\n\n&nbsp; Car carObj2(\"Ford\", \"Mustang\", 1969);\n\n\n\n\n&nbsp; \/\/ Print values\n\n&nbsp; cout &lt;&lt; carObj1.brand &lt;&lt; \" \" &lt;&lt; carObj1.model &lt;&lt; \" \" &lt;&lt; carObj1.year &lt;&lt; \"\\n\";\n\n&nbsp; cout &lt;&lt; carObj2.brand &lt;&lt; \" \" &lt;&lt; carObj2.model &lt;&lt; \" \" &lt;&lt; carObj2.year &lt;&lt; \"\\n\";\n\n&nbsp; return 0;\n\n}<\/span><\/pre>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062e\u0631\u0648\u062c\u06cc \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0647 \u0645\u0627\u0646\u0646\u062f \u0642\u0628\u0644 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f. \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0647 \u0645\u0627\u0646\u0646\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u0642\u0628\u0644 \u0628\u0648\u062f\u0647 \u0648 \u0641\u0642\u0637 \u0633\u0627\u0632\u0646\u062f\u0647 \u06a9\u0644\u0627\u0633 \u062e\u0627\u0631\u062c \u0627\u0632 \u06a9\u0644\u0627\u0633 \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc \u0634\u062f\u0647 \u0627\u0633\u062a.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"font-size: 14px;\">\u062a\u0627\u0628\u0639 \u0639\u0636\u0648 \u062e\u0635\u0648\u0635\u06cc \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627<\/span><\/h3>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062f\u0631 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc c++ \u0628\u0627 \u0648\u0627\u0698\u0647 \u06a9\u0644\u06cc\u062f\u06cc \u0639\u0645\u0648\u0645\u06cc \u06cc\u0627 public \u0622\u0634\u0646\u0627 \u0647\u0633\u062a\u06cc\u062f. \u0627\u06cc\u0646 \u0648\u0627\u0698\u0647 \u062a\u0642\u0631\u06cc\u0628\u0627 \u062f\u0631 \u0647\u0645\u0647 \u0646\u0645\u0648\u0646\u0647\u200c\u0647\u0627\u06cc \u06a9\u0644\u0627\u0633 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f. \u0628\u0647 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u062a\u0648\u062c\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 14px;\">#include &lt;iostream&gt;\n\nusing namespace std;\n\n\n\n\nclass MyClass {&nbsp; &nbsp;\/\/ The class\n\n&nbsp; public:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\/\/ Public access specifier\n\n&nbsp; &nbsp; int x;&nbsp; &nbsp; &nbsp; &nbsp; \/\/ Public attribute (int variable)\n\n};\n\n\n\n\nint main() {\n\n&nbsp; MyClass myObj;&nbsp; \/\/ Create an object of MyClass\n\n\n\n\n&nbsp; \/\/ Access attributes and set values\n\n&nbsp; myObj.x = 15;\n\n\n\n\n&nbsp; \/\/ Print values\n\n&nbsp; cout &lt;&lt; myObj.x;&nbsp;\n\n&nbsp; return 0;\n\n}<\/span><\/pre>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062e\u0631\u0648\u062c\u06cc \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0639\u062f\u062f \u06f1\u06f5 \u0627\u0633\u062a.<\/span><\/p>\n\n\n\n<p><span style=\"font-size: 14px;\">\u06a9\u0644\u06cc\u062f \u0648\u0627\u0698\u0647 \u0639\u0645\u0648\u0645\u06cc \u06cc\u06a9 \u0645\u0634\u062e\u0635 \u06a9\u0646\u0646\u062f\u0647 \u062f\u0633\u062a\u0631\u0633\u06cc \u0627\u0633\u062a. \u0627\u06cc\u0646 \u0645\u0634\u062e\u0635 \u06a9\u0646\u0646\u062f\u0647\u200c\u0647\u0627 \u0646\u062d\u0648\u0647 \u062f\u0633\u062a\u0631\u0633\u06cc \u0628\u0647 \u0648\u06cc\u0698\u06af\u06cc\u200c\u0647\u0627 \u0648 \u0631\u0648\u0634\u200c\u0647\u0627 \u0631\u0627 \u0645\u0634\u062e\u0635 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. \u062f\u0631 \u0645\u062b\u0627\u0644 \u0642\u0628\u0644 \u0627\u0639\u0636\u0627\u0621 \u0628\u0647 \u0635\u0648\u0631\u062a \u0639\u0645\u0648\u0645\u06cc \u062a\u0639\u0631\u06cc\u0641 \u0634\u062f\u0647\u200c\u0627\u0646\u062f. \u0627\u06cc\u0646 \u0628\u062f\u0627\u0646 \u0645\u0639\u0646\u0627\u0633\u062a \u06a9\u0647 \u0627\u0632 \u062e\u0627\u0631\u062c \u0627\u0632 \u06a9\u062f \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0628\u0647 \u0622\u0646\u0647\u0627 \u062f\u0633\u062a\u0631\u0633\u06cc \u067e\u06cc\u062f\u0627 \u06a9\u0631\u062f \u0648 \u0627\u0635\u0644\u0627\u062d\u0627\u062a\u06cc \u0627\u0646\u062c\u0627\u0645 \u062f\u0627\u062f. \u062f\u0631 c++ \u0633\u0647 \u0645\u0634\u062e\u0635\u200c\u06a9\u0646\u0646\u062f\u0647 \u062f\u0633\u062a\u0631\u0633\u06cc \u062f\u0627\u0631\u06cc\u0645.<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-size: 14px;\">\u0627\u0648\u0644 \u062d\u0627\u0644\u062a \u0639\u0645\u0648\u0645\u06cc \u06a9\u0647 \u0627\u0639\u0636\u0627\u06cc \u062e\u0627\u0631\u062c \u0627\u0632 \u06a9\u0644\u0627\u0633 \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u0631\u0633 \u062e\u0648\u0627\u0647\u0646\u062f \u0628\u0648\u062f.<\/span><\/li>\n\n\n\n<li><span style=\"font-size: 14px;\">\u062d\u0627\u0644\u062a \u062e\u0635\u0648\u0635\u06cc \u06a9\u0647 \u0627\u0632 \u062e\u0627\u0631\u062c \u06a9\u0644\u0627\u0633 \u0646\u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0628\u0647 \u0627\u0639\u0636\u0627\u0621 \u062f\u0633\u062a\u0631\u0633\u06cc \u062f\u0627\u0634\u062a.<\/span><\/li>\n\n\n\n<li><span style=\"font-size: 14px;\">\u062d\u0627\u0644\u062a \u0645\u062d\u0627\u0641\u0638\u062a \u0634\u062f\u0647 \u06a9\u0647 \u062f\u0631 \u0627\u06cc\u0646 \u062d\u0627\u0644\u062a \u0627\u0639\u0636\u0627\u0621 \u0627\u0632 \u062e\u0627\u0631\u062c \u06a9\u0644\u0627\u0633 \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u0631\u0633 \u0646\u0628\u0648\u062f\u0647 \u0627\u0645\u0627 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0627\u0631\u062b\u200c\u0628\u0631\u06cc \u062f\u0631 \u06a9\u0644\u0627\u0633\u0647\u0627\u06cc \u062f\u06cc\u06af\u0631 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0628\u0647 \u0627\u0639\u0636\u0627\u0621 \u062f\u0633\u062a\u0631\u0633\u06cc \u062f\u0627\u0634\u062a. \u062f\u0631 \u0628\u062d\u062b \u0627\u0631\u062b\u200c\u0628\u0631\u06cc \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0648\u0636\u0648\u0639 \u0627\u0634\u0627\u0631\u0647 \u062e\u0648\u0627\u0647\u062f \u0634\u062f.<\/span><\/li>\n<\/ul>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062f\u0631 \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631 \u0628\u0647 \u062a\u0641\u0627\u0648\u062a \u062d\u0627\u0644\u062a \u0639\u0645\u0648\u0645\u06cc \u0648 \u062e\u0635\u0648\u0635\u06cc \u0627\u0634\u0627\u0631\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 14px;\">#include &lt;iostream&gt;\n\nusing namespace std;\n\n\n\n\nclass MyClass {\n\n&nbsp; public:&nbsp; &nbsp; \/\/ Public access specifier\n\n&nbsp; &nbsp; int x;&nbsp; &nbsp;\/\/ Public attribute\n\n&nbsp; private:&nbsp; &nbsp;\/\/ Private access specifier\n\n&nbsp; &nbsp; int y;&nbsp; &nbsp;\/\/ Private attribute\n\n};\n\n\n\n\nint main() {\n\n&nbsp; MyClass myObj;\n\n&nbsp; myObj.x = 25;&nbsp; \/\/ Allowed (x is public)\n\n&nbsp; myObj.y = 50;&nbsp; \/\/ Not allowed (y is private)\n\n&nbsp; return 0;\n\n}<\/span><\/pre>\n\n\n\n<p><span style=\"font-size: 14px;\">\u062e\u0631\u0648\u062c\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0634\u0627\u0645\u0644 \u062e\u0637\u0627\u0647\u0627\u06cc\u06cc \u0627\u0633\u062a \u06a9\u0647 \u062f\u0644\u06cc\u0644 \u0622\u0646 \u0645\u062a\u063a\u06cc\u0631\u06cc \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u0645\u062d\u06cc\u0637 \u062e\u0635\u0648\u0635\u06cc \u062a\u0639\u0631\u06cc\u0641 \u0634\u062f\u0647 \u0627\u0633\u062a.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 14px;\">In function 'int main()':\n\nLine 8: error: 'int MyClass::y' is private\n\nLine 14: error: within this context<\/span><\/pre>\n\n\n\n<p><span style=\"font-size: 14px;\">\u0628\u0627 \u0645\u0627 \u062f\u0631 \u0622\u0645\u0648\u0632\u0634 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc c++ \u0647\u0645\u0631\u0627\u0647 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u0634\u0627\u0645\u0644 \u0628\u062e\u0634\u0647\u0627\u06cc \u0645\u062a\u0646\u0648\u0639 \u062f\u06cc\u06af\u0631\u06cc \u0627\u0632 <strong>\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u062f\u0631 c++<\/strong> \u0628\u0648\u062f\u0647 \u0648 \u0646\u06cc\u0627\u0632\u0647\u0627\u06cc \u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc \u0627\u0641\u0631\u0627\u062f \u0631\u0627 \u0645\u0631\u062a\u0641\u0639\u200c\u062a\u0631 \u062e\u0648\u0627\u0647\u062f \u0646\u0645\u0648\u062f.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u062f\u0631 c++ C++ \u06cc\u06a9 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u062d\u0628\u0648\u0628 \u0627\u0633\u062a. \u0627\u06cc\u0646 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u0631\u0627\u06cc\u0627\u0646\u0647 \u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc c++ \u06cc\u06a9 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 \u0627\u0633\u062a \u0648 \u0628\u0631\u062e\u06cc \u0627\u0632 \u0645\u0641\u0627\u0647\u06cc\u0645 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u062c\u062f\u06cc\u062f \u0628\u0627\u0634\u062f. \u0628\u0631\u0627\u06cc \u0622\u0645\u0648\u062e\u062a\u0646 \u0628\u06cc\u0634\u062a\u0631 \u0627\u06cc\u0646 \u0632\u0628\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0645\u0631\u0648\u0631 \u06a9\u0631\u062f \u0648 \u062a\u0645\u0631\u06cc\u0646 [&hellip;]<\/p>\n","protected":false},"author":78,"featured_media":10277,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,19],"tags":[],"class_list":["post-10275","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming-and-it-training","category-c-cpp-c-sharp-articles"],"_links":{"self":[{"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/posts\/10275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/users\/78"}],"replies":[{"embeddable":true,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/comments?post=10275"}],"version-history":[{"count":5,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/posts\/10275\/revisions"}],"predecessor-version":[{"id":64499,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/posts\/10275\/revisions\/64499"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/media\/10277"}],"wp:attachment":[{"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/media?parent=10275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/categories?post=10275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/maktabkhooneh.org\/mag\/wp-json\/wp\/v2\/tags?post=10275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}