:: Re: [DNG] Pointer error in the back…
Top Pagina
Delete this message
Reply to this message
Auteur: aitor_czr
Datum:  
Aan: KatolaZ, dng
Onderwerp: Re: [DNG] Pointer error in the backend of Netman
I rectify:

p = &x;     // This is -> *p=5


On 12/10/2015 01:11 PM, aitor_czr wrote:
> Hi Katolaz,
>
> In this case active_wifis is an argument passed by reference. So:
>
> active_wifis --> is the address
> *active_wifis --> is the value
>
> Try doing:
>
> int x = 5;
> int *p, *q;
>
> p = &x;     // This is -> p=5
> q = p;

>
> printf(" The values are:     %d   %d  ", *p, *q);
> printf(" The addresses are:  %d   %d  ",  p,  q);

>
> Aitor.
>
> On 12/10/2015 12:56 PM, KatolaZ <katolaz@???> wrote:
>> Sorry for the silly, uninformed, and preposterous comment, which you
>> would probably be better off ignoring altogether, but I can't see any
>> reasonable way in which a C variable and its address might be "the
>> same", especially when used as the first argument of a realloc (unless
>> the value of that variable is a pointer to its own address, which is
>> something so deep to defy my limited understanding)...
>>
>> HND
>>
>> KatolaZ