Re: [cc65] Another wish: Unsized Arrays in Structures

Date view Thread view Subject view

From: Tim Schürmann (tischuer_at_web.de)
Date: 2003-01-23 17:36:23


Hi Spiro,

Spiro Trikaliotis schrieb:

> > What you got there is, that TestStruct points to a beginning of the
> > allocated memory of 1 TestStruct (why do you "malloc" the TestStruct?
> > TestStruct already exist)
>
> well, the type TestStruct exists, but there isn't memory for it.

No, because:

struct noname {
...
};
struct noname TestStruct;


and


struct {
...
} TestStruct;


defines both a variable TestStruct. It is not nessesary to allocate memory (only
for the *data array - see also the original mail from Christian Krüger).

Bye,

Tim Schürmann
tischuer_at_web.de


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-01-23 17:37:47 CET