On Jan 3, 8:29 am, "Skyer" <q...@o2.pl> wrote:
> How to write?
>
> I have write program in C language. This program contain 1 array[20][20]
> with struct. Every element of table must be dynamic list LIFO (stack).
> Adding and removing struct variable from list array[x][y].
> My question: How to declare this table?
> How to begining, any ideas?
>
> struct list {
> int *type;
> struct list *next_elem;
>
> }element;Example:
> I add new element to array[20][1]
> next i adding next elemtent do array[20][[1]
> A remove first from array[20][1] - LIFO
If I understand your question, I'd say:
struct list * array[20][20];
Note that if you use a array whose size is 20, it goes from 0 to 19 in
C.
Hence, do not use array[20][1] for instance.
--
Pierre
|