Telegram Group & Telegram Channel
9. نصائح لاستخدام cin

🔰 استخدام endl أو n\ لإدخال سطر جديد:

endl 

يُفضل استخدامه لأنه يفرغ (Buffer) أيضًا.

\n 
أسرع ولكن لا يفرغ Buffer.

🔰 تجنب استخدام cin و getline معًا دون تنظيف buffer:

︎ بعد استخدام cin، قد يتبقى حرف السطر الجديد (n\) في buffer، مما يؤثر على getline.

🔸️ الحل:

︎ استخدام cin.ignore() لتنظيف Buffer


8. الخلاصة العامة لإستخدام الكائن cin


︎ الكائن cin يُستخدم لقراءة المدخلات من المستخدم.

︎ يمكن استخدامه مع أنواع البيانات المختلفة مثل int, double, char, string.

︎ الدالة getline تُستخدم لقراءة النصوص الكاملة التي تحتوي على مسافات.

︎ الجملة cin.ignore() يُستخدم لتنظيف Buffer بعد استخدام cin.

︎ كتابة كود واضح ومنظم مع استخدام التعليقات يجعل البرنامج أكثر قابلية للقراءة والصيانة

#برمجة_و_تطوير
#دورة_سي_بلس_بلس
#C_plus_plus

#الدرس_العاشر_سي_بلس_بلس
#المستوى_الأول

الرجاء متابعة قناتنا  👇
https://www.tg-me.com/us/telegram/com.artificial_AI_intelligence

🥰 قال رسول الله ﷺ << إذا مات ابن آدم؛ انقطع عمله إلا من ثلاث: صدقة جارية، أو علم ينتفع به، أو ولد صالح يدعو له >>  رواه مسلم.

🤗 اذا إستفدت من الدرس لا تنسى الدعاء لنا 🤲



tg-me.com/artificial_AI_intelligence/980
Create:
Last Update:

9. نصائح لاستخدام cin

🔰 استخدام endl أو n\ لإدخال سطر جديد:

endl 

يُفضل استخدامه لأنه يفرغ (Buffer) أيضًا.

\n 
أسرع ولكن لا يفرغ Buffer.

🔰 تجنب استخدام cin و getline معًا دون تنظيف buffer:

︎ بعد استخدام cin، قد يتبقى حرف السطر الجديد (n\) في buffer، مما يؤثر على getline.

🔸️ الحل:

︎ استخدام cin.ignore() لتنظيف Buffer


8. الخلاصة العامة لإستخدام الكائن cin


︎ الكائن cin يُستخدم لقراءة المدخلات من المستخدم.

︎ يمكن استخدامه مع أنواع البيانات المختلفة مثل int, double, char, string.

︎ الدالة getline تُستخدم لقراءة النصوص الكاملة التي تحتوي على مسافات.

︎ الجملة cin.ignore() يُستخدم لتنظيف Buffer بعد استخدام cin.

︎ كتابة كود واضح ومنظم مع استخدام التعليقات يجعل البرنامج أكثر قابلية للقراءة والصيانة

#برمجة_و_تطوير
#دورة_سي_بلس_بلس
#C_plus_plus

#الدرس_العاشر_سي_بلس_بلس
#المستوى_الأول

الرجاء متابعة قناتنا  👇
https://www.tg-me.com/us/telegram/com.artificial_AI_intelligence

🥰 قال رسول الله ﷺ << إذا مات ابن آدم؛ انقطع عمله إلا من ثلاث: صدقة جارية، أو علم ينتفع به، أو ولد صالح يدعو له >>  رواه مسلم.

🤗 اذا إستفدت من الدرس لا تنسى الدعاء لنا 🤲

BY البرمجة و الذكاء الإصطناعي


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/artificial_AI_intelligence/980

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

The STAR Market, as is implied by the name, is heavily geared toward smaller innovative tech companies, in particular those engaged in strategically important fields, such as biopharmaceuticals, 5G technology, semiconductors, and new energy. The STAR Market currently has 340 listed securities. The STAR Market is seen as important for China’s high-tech and emerging industries, providing a space for smaller companies to raise capital in China. This is especially significant for technology companies that may be viewed with suspicion on overseas stock exchanges.

Telegram Auto-Delete Messages in Any Chat

Some messages aren’t supposed to last forever. There are some Telegram groups and conversations where it’s best if messages are automatically deleted in a day or a week. Here’s how to auto-delete messages in any Telegram chat. You can enable the auto-delete feature on a per-chat basis. It works for both one-on-one conversations and group chats. Previously, you needed to use the Secret Chat feature to automatically delete messages after a set time. At the time of writing, you can choose to automatically delete messages after a day or a week. Telegram starts the timer once they are sent, not after they are read. This won’t affect the messages that were sent before enabling the feature.

telegram from us


Telegram البرمجة و الذكاء الإصطناعي
FROM USA