c++ array zero-initialization: Is this a bug, or is this correct?
问题 Note: We are speaking about (supposedly) C++98 compliant compilers, here. This is not a C++11 question. We have a strange behavior in one of our compilers and we're not sure if this is Ok or if this is a compiler bug: // This struct has a default constructor struct AAA { AAA() : value(0) {} int value ; } ; // This struct has a member of type AAA and an array of int, both surrounded // by ints struct BBB { int m_a ; AAA m_b ; int m_c ; int m_d[42] ; } ; When BBB is initialized as such: BBB bbb