1 Dec 2009 01:05
Re: Warning when using const pointer to fixed size array
Thomas Martitz <thomas.martitz <at> student.HTW-Berlin.de>
2009-12-01 00:05:20 GMT
2009-12-01 00:05:20 GMT
Am 01.12.2009 00:46, schrieb me22:
> 2009/11/30 Thomas Martitz<thomas.martitz <at> student.htw-berlin.de>:
>
>> What address are you taking? "array" already stands for the address of the
>> first element (and is hence sort of a pointer). I'm not sure you can take
>> the address of the array name as I think it doesn't have one.
>>
>>
> You can, actually:
>
> int main() {
> int a[4];
> int (*p)[4] =&a;
> }
>
I didn't try gcc, but visual studio compiler gives an error on that one.
RSS Feed