6
Hằng số Enum hoạt động khác nhau trong C và C ++
Tại sao điều này: #include <stdio.h> #include <limits.h> #include <inttypes.h> int main() { enum en_e { en_e_foo, en_e_bar = UINT64_MAX, }; enum en_e e = en_e_foo; printf("%zu\n", sizeof en_e_foo); printf("%zu\n", sizeof en_e_bar); printf("%zu\n", sizeof e); } in 4 8 8trong C và 8 8 8trong C ++ (trên nền tảng …