C ++中的枚举类型数据的大小是多少?
这是一个C ++面试测试问题而不是作业。 #include <iostream> using namespace std; enum months_t { january, february, march, april, may, june, july, august, september, october, november, december} y2k; int main () { cout << "sizeof months_t is " << sizeof(months_t) << endl; cout << "sizeof y2k is " << sizeof(y2k) << endl; enum months_t1 { …