6
C 및 C ++에서 다르게 작동하는 열거 형 상수
이유 : #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); } 4 8 8C 및 8 8 8C ++로 인쇄 합니까 (4 바이트 정수가있는 플랫폼에서)? 나는 UINT64_MAX할당이 …