עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

מחפש אפשרות לקלוט סיפרה מבלי להקיש ENTER ב-++C

Featured Replies

פורסם

אני בונה מע' תפריטים ואני רוצה שהמשתמש ייבחר מספר מתפריט אך מבלי להקיש ENTER אחרי בחירת הסיפרה. מישהו מכיר פקודה לעשות את זה?

פורסם

getch

getc

getchar

אחד מאלה אני תמיד מתבלבל

זה קורא תו אחד מהמקלדת (כל תו)

משהו בסיגנון של

c = getch();

עריכה - בדקתי וזה getchar

c = getchar();

פורסם

הי,

באיזה OS אתה כותב את זה?

getchar - לוקח מה- stdin

getc - לוקח מ- stream שתתן לו בתור פרמטר.

אם אתה עובד ב- unicode

תשתמש ב-

getwchar או getwc

פורסם

אני מעריך שאתה כותב מה שנקרא CONSOLE APPLICATION (כל WIN APP שמכבדת את עצמה לא תבקש מהמשתמש להקיש מספרים כדי לבחור אפשרויות בתפריט) ככה ש-GETCHAR יבצע את העבודה.

בלי שום קשר, אני אף פעם לא משתמש בשיטה הזאת אלא תמיד מחכה ל-ENTER מהסיבה הפשוטה שבמידה והייתה טעות הקלדה המשתמש יוכל לתקן......

פורסם

אני מכיר גם getch

בתוך conio.h

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.