T
Timothy Madden
Hello
Why does C++ not allow incomplete array types as C does ?
Like this:
struct ArchiveHeader
{
size_t iSize;
int iVerMaj;
int iVerMin;
size_t nDataLen;
unsigned char
data[]; // unspecified size
};
// ArchiveHeader remains an incomplete type,
// can only be used in a pointer or reference type
Why does C++ not allow incomplete array types as C does ?
Like this:
struct ArchiveHeader
{
size_t iSize;
int iVerMaj;
int iVerMin;
size_t nDataLen;
unsigned char
data[]; // unspecified size
};
// ArchiveHeader remains an incomplete type,
// can only be used in a pointer or reference type