kerdesek
Valenta Ferenc
ferenc.valenta at vhl.hu
Wed Aug 31 21:08:40 CEST 2005
Andras Tantos wrote:
> Szoval feltehetoen az tortenik, hogy az IAR szerint int i[0] ugyanaz,
> mint az int i[], ami 'incomplete type'. Az mar egy masik kerdes, hogy a
Aha, lehet.
> For non-zero-length arrays, this is the same as a pointer to the first
> element of the array created by that new-expression. Zerolength arrays
> do not have a first element.
>
> Szoval, akkor megis van 0 hosszusagu tomb?
Ezen vitatkozzanak csak a C tudorok, amint latom, van meg mit
fejleszteni a szabvanyon :)
Gondolkozzunk. Egy tombot az elso elemere mutato pointerrel azonosit
a C. Ha nincs elso elem, hova kell hogy mutasson a pointer?
Nem letezik ilyen pointer, tehat nem letezik 0 hosszu tomb.
Q.E.D.
> Megoldaskent ird at uint8_t info[1]-re felteve, hogy a sizeof(ctl) != 0.
Az is mukodik, de miben jobb, mint az uint8_t *info ?
Tenyleg nem ertem. Nem ugyanazt csinalja?
> Tantos Andras
--
Valenta Ferenc <ferenc.valenta at vhl.hu> Volcano/Mentor Graphics
"My love is REAL, unless declared INTEGER"
More information about the Elektro
mailing list