Quick Help needed on C | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Quick Help needed on C

I saw a struct declaration in form of struct name { uint8_t type:4; uint8_t length:6; } My question is, why insert a colon between the field name and the literal value? In particular, what's the use of doing 'type:4'? https://code.sololearn.com/cvqIJ14p1OBu/?ref=app

15th Feb 2022, 9:34 PM
Dlite
Dlite - avatar
1 Réponse
15th Feb 2022, 10:12 PM
Ipang