Arrays of Variable Length
andrea gelmini
andrea.gelmini a lugbs.linux.it
Mer 10 Apr 2002 18:28:30 UTC
On Wed, Apr 10, 2002 at 04:28:23PM +0200, Carlo wrote:
>
> Problema, devo maneggiare in c Arrays of Variable Length di una struttura
> e passarli a varie funzioni.
devi obbligatoriamente usare i puntatori.[1]
> ex:
> struct micio
> { char gatto[20];
> int numgatt;
> }
>
> int num;
>
> struct micio gatti[num];
c'e` un esempio che fa a caso tuo proprio sul K&R...
se ne vuoi una versione in formato elettronico fai un fischio.
ciao,
andrea
n.b.: ho appena chiesto a google...
http://www.geocities.com/schonberger_andrew/kandr.html
----
[1] oddio, puoi usare dei barbatrucchi consentiti dal gcc, ma che non sono
standard...
Maggiori informazioni sulla lista
Lug
|