Mail Archives: djgpp/2001/01/12/17:16:35
In article <3A5F3FD0 DOT FA33C29B AT ma DOT tum DOT de>,
Waldemar Schultz <schultz AT ma DOT tum DOT de> wrote:
> Tom St Denis schrieb:
> > You can't allocate int x[][2] in C. It's invalid since the compiler doesn'ty
> > know how manythere are.
> what I intended of course allocte x[n][2] with n not constant, I did this
> before.
That's why you do
x = realloc(x, sizeof(int **) * newnumberofpointers).
(I think that's how realloc works...I never have used it though).
> > passing myfunc(int a[]) is bad form... instead myfunc(int *a) is clearer.
> I know, but that's the libraries prototype I have to live with.
Your lib blows :-)
Well see below.
> > BTW this is OT for this group.
> sorry about that, but I dared to ask, where the answers really could be given.
Sorry I am not a C guru, just ask in comp.lang.c and they should be able to
clear things up.
Tom
Sent via Deja.com
http://www.deja.com/
- Raw text -