Re: printing array in function

Jan Kratochvil
2010-09-03T09:16:07Z

On Fri, 03 Sep 2010 11:06:02 +0200, Nicolas Sabouret wrote:
> 1: void f(int tab[]) {
> 2: tab[0] = 1;
> 3: }
> (gdb) p tab -> (int *) 0xbffff440

I have only an idea by C++:

void f(int (&tab)[2]) {
(gdb) p tab
$1 = (int (&)[2]) @0x7fffffffde50: {-1, -1}

Regards,
Jan