Re: array pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


int  *s_ptr;
int  **d_ptr;
int arr[2][2]={1,2,3,4};

s_ptr=*arr;  /* This is perfectly fine */
d_ptr=arr /* this line throws a  warning: assignment from incompatible
pointer type */  ????????



On Tue, Jan 18, 2011 at 6:53 PM, ratheesh k <ratheesh.ksz@xxxxxxxxx> wrote:
> i made a mistake  d_ptr is  int **d_ptr
>
> On Tue, Jan 18, 2011 at 6:52 PM, ratheesh k <ratheesh.ksz@xxxxxxxxx> wrote:
>> int  *s_ptr;
>> int  *d_ptr;
>> int arr[2][2]={1,2,3,4};
>>
>> s_ptr=*arr;  /* This is perfectly fine */
>> d_ptr=arr /* this line throws a  warning: assignment from incompatible
>> pointer type */
>>
>> What is the problem here ?
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

Add to Google Powered by Linux