Hi guys,
I'm not too familiar with C, and i've got to make some additions to existing code.
There's a struct defined as
Code:
typedef struct _LOG_RECORD
{
ULONG Length; // Length of log record. This Does not include
WCHAR Name[]; // This is a null terminated string
} LOG_RECORD, *PLOG_RECORD;
The code with the struct compiles without a problem, but as soon as i add an additional WCHAR To[] to the struct.
Code:
typedef struct _LOG_RECORD
{
ULONG Length; // Length of log record. This Does not include
WCHAR Name[]; // This is a null terminated string
WCHAR To[]; // This is a null terminated string
} LOG_RECORD, *PLOG_RECORD;
I get the following error : error C2229: struct '_LOG_RECORD' has an illegal zero-sized array.
If remove the variable "To" again, everything compiles.
Can anyone please tell my this would be.
Thank you