C

typedef

Në shqip përdoret i njëjti emër.

ShpjegimiSQ

typedef i jep një emër të ri një tipi ekzistues. Përdoret shumë me struct-et, që të shkruash thjesht Nxenes në vend të struct Nxenes, ose për t'i dhënë kuptim një tipi — typedef unsigned char Bajt;.

EnglishEN

typedef gives a new name to an existing type. It's used a lot with structs, so you can write just Student instead of struct Student, or to give a type meaning — typedef unsigned char Byte;.

Si ta mendosh

Si nofka: „Beni“ në vend të „Besnik Gashi“ — i njëjti person, më shkurt.

Lexoje në anglisht

Like a nickname: “Beni” instead of “Besnik Gashi” — same person, shorter.

Shembull kodic

typedef struct {
    int x, y;
} Pika;
Pika p = {3, 4};

Terma të lidhur