• 1 year ago

Do you want your C++ code to be easy to read and understand, not just for yourself but for anyone else working on it? Comments are the magic tool to achieve that! In this video, we provide a comprehensive and simplified explanation of the importance of comments in C++, and how to effectively use them to enhance your code's quality and maintainability.

Whether you're a beginner C++ developer or looking to adopt best programming practices, you'll find everything you need here to master the art of code commenting. We will cover:

What are comments and why are they essential?: Understanding their role in documenting code and improving readability.

Types of comments in C++: The difference between single-line comments (//) and block comments (/* ... */).

Best practices for writing effective comments: When, where, and what to comment.

Bad comments to avoid: And what makes a comment unhelpful or misleading.

Clear and practical examples: To apply each type of comment in different scenarios.

Make your code speak clearly! Watch this video now and master using comments in C++ to write professional, clean, and maintainable code.
هل ترغب في أن يصبح كود C++ الخاص بك سهل القراءة والفهم، ليس فقط لك ولكن لأي شخص آخر يعمل عليه؟ التعليقات (Comments) هي أداة سحرية لتحقيق ذلك! في هذا الفيديو، نقدم لك شرحًا شاملاً ومبسطًا لأهمية التعليقات في لغة C++، وكيفية استخدامها بفاعلية لتحسين جودة وقابلية صيانة الكود الخاص بك.

سواء كنت مطور C++ مبتدئًا أو تسعى لتبني أفضل الممارسات البرمجية، ستجد هنا كل ما تحتاجه لإتقان فن التعليق على الأكواد. سنتناول:

ما هي التعليقات ولماذا هي ضرورية؟: فهم دورها في توثيق الكود وتسهيل فهمه.

أنواع التعليقات في C++: الفرق بين تعليقات السطر الواحد (//) وتعليقات الكتل (/* ... */).

أفضل الممارسات لكتابة تعليقات فعالة: متى، أين، وماذا يجب أن تعلق.

التعليقات السيئة التي يجب تجنبها: وما الذي يجعل التعليق عديم الفائدة أو مضللاً.

أمثلة عملية وواضحة: لتطبيق كل نوع من التعليقات في سيناريوهات مختلفة.

اجعل كودك يتحدث بوضوح! شاهد هذا الفيديو الآن وأتقن استخدام التعليقات في C++ لتكتب أكوادًا احترافية، نظيفة، وسهلة الصيانة.

Category

📚
Learning
Transcript
00:00Comment
00:02C++
00:04What does this mean?
00:06This is how to use code
00:08and make it easier
00:10and easier
00:12as well as
00:14you can use code
00:16when you use code
00:18or when you use code
00:20or when you use code
00:22What does that mean?
00:24This is how to use code
00:26for example
00:28for example
00:30before the include
00:32I can share this
00:34I press the slash slash
00:36or the
00:38slash slash
00:40slash
00:42slash
00:44or the escape sequence
00:46or the sequence
00:48or the sequence
00:50or the slash
00:52slash
00:54or the slash
00:56or the slash
00:58or the slash
01:00or the slash
01:02or the slash
01:06how to include
01:08the
01:12and as well
01:18آآ تمام في مثلا هنا ممكن صوت جريد اسوي آآ آآ آآ آآ يعني
01:30فروم فروم آيو ستريم يعني من من المكتبة آيو ستريم آآ آآ تو آآ
01:45او تستخدم يعني ممكن اكتبها بالعربي او ممكن اكتبها بالانجليزي
01:50انها تستخدم مثلا آآ بديلة عن كتابة الاس تي دي في بداية كل جملة
02:04داخل الكود داخل داخل الكود يعني فممكن انا اسوي التعليق بالعربي
02:14الانجليزي وآآ بحيث ان التعليق هذا لاية القراءاته آآ من قبل
02:20المترجم الخاص بالبرنامج وهكذا اذا في معي انا آآ تعليق النوع
02:26الاول اللي هو تعليق لصطف واحد ولو شغلت البرنامج يشتغل طبيعي ما
02:32يقراش هذا الكود نهائيا التعليق الثاني ممكن انا استخدمه بشكل آآ
02:40اكثر من سطر يعني ممكن انا اكتب مثلا اكثر من سطر او
02:46تعليق اكثر من سطر اكتب العرامتي التنصيص آآ عرامتي
02:51التنصيص ثم نجمر هذا التعليق تلاحظ انه عملت يعني وكانه
02:57علق الكود كامل الموجود هنا بس انا اشتيه مثلا اكثر من سطر اخوان
03:03هنا انزل اكثر من سطر وسوي نفس الحركة اللي هو حركة الكود بس
03:10قبلها نجمة ثم اللي هو علامة ايش العلامة المقابلة العلامة
03:19المقابلة للسلاش هنا السلاش اللي هو من جهة آآ يعني اليسار
03:26لليمين ثم السلاش اللي هو من جهة اليسار لليمين المستقدم في
03:32السيكواز اسكيب
03:34تمام هنا ممكن اكتب الكود اي نص قصدي هنا ممكن اكتب اي شرح في
03:40هذا الاسطر ولا يتم قراءتها مثلا على سبيل المثال اشرح الكود
03:45اكتب هناش ايش اه اككسبلين بالعربي بالاكبيزة مثلا اكسبلينезж qualcosa
04:01To
04:03To
04:05In
04:07Main
04:09Remain
04:11Return
04:13Zero
04:15I can say
04:17The int
04:19The int
04:21The int
04:23Integer
04:25Return
04:27I can write here
04:29For example
04:31In
04:33The
04:35The
04:37The
04:39The
04:41The
04:43The
04:45The
04:47The
04:49The
04:51The
04:53The
04:55The
04:57The
04:59The
05:01The
05:03The
05:07The
05:09The
05:10Th
05:27This is a important thing for you to make a video.
05:32It's a very important thing.
05:34If you have a video, you can add code to this one.
05:39If you have this code, I'll do it before it.
05:43It's a very important thing.
05:46It's a great thing.
05:49If you have this code, I'll do it with the code,
05:54hello slash and njima
05:56then I'll give you this place
05:58for example, I'm a njima slash
06:00and this means that
06:02these two don't have to read them
06:04as a link
06:06I'll show you
06:08the first one
06:10hello world
06:12welcome to us
06:14this one
06:16this is the
06:18simple
06:20this is the
06:22information
06:24in a simple way
06:26.
06:28.
06:30.
06:32.
06:34.
06:36.
06:38.
06:40.
06:42.
06:44.
06:46.
06:48.

Recommended