📅  最后修改于: 2022-03-11 15:04:43.661000             🧑  作者: Mango
/* It's used to save some memery in a struct
It basically tells the compiler that
"hey, this variable only needs to be x bits wide,
so pack the rest of the fields in accordingly, OK?" */
// Exemple
struct remain {
int mod3 : 2; // int usualy takes 4 bits in memory but here it will be only 2
int mod4 : 2;
int mod5 : 3; // and here 3
};