Skip to content · ⁨דלג לתוכן⁩

Structs and typedef: . vs -> · ⁨מבנים ו-typedef: נקודה מול חץ⁩

English

Grouping related data

  • A struct groups several values into one thing. A point has an x and a y; a rectangle has a width and a height.
  • Each value inside is called a member (or field). They can have different types.
  • Structs let you pass one tidy thing around instead of many loose variables.

עברית

קבוצת נתונים קשורים

  • מבנה מקבץ מספר ערכים לדבר אחד. נקודה כוללת x ו-y; מלבן כולל width ו-height.
  • כל ערך פנימי נקרא חבר (Member) או שדה. לחברים יכולים להיות סוגים שונים.
  • Structs מאפשרים למסור חפץ מסודר אחד במקום משתנים רבים מפוזרים.

Structure Point עם x ו-y; הגישה לשדה מתבצעת באמצעות . על ה-struct, או -> דרך איشار pointer

Handout · ⁨חומר עזר⁩

Log in or create account · ⁨היכנס או צור חשבון⁩

IGCSE, A-Level & AP