Re: Xcode chockes on variable-sized arrays in struct definitions
Re: Xcode chockes on variable-sized arrays in struct definitions
- Subject: Re: Xcode chockes on variable-sized arrays in struct definitions
- From: Mike <email@hidden>
- Date: Tue, 23 Jan 2007 16:05:41 -0700
That doesn't work either.
Putting the 1 in the braces generates another error:
error: too many initializers for 'FieldDefinition [1]'
Mike
Syd Polk wrote:
-----Original Message-----
struct DataDefinition
{
DATATYPES DataType;
DWORD RevLevel;
DWORD FieldCount;
FieldDefinition Field[]; // <-------------------- This
seems to be
the problem structure
};
Standard C does not allow this syntax; you must put in a size there:
FieldDefinition Field[1];
would fix your problem. Visual C++, MPW and CodeWarrior all had this
extension in their compilers; gcc (and therefore Xcode) does not.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden