Re: Passing address of multidimentional array
- From: "Cezary H. Noweta" <chncc@xxxxxxxxxxxxxxx>
- Date: Tue, 03 Jun 2008 21:25:14 +0200
Doug Harrison [MVP] wrote:
All the following are equivalent:
void f(int a[20][30]);
void f(int a[2][30]);
void f(int a[][30]);
void f(int (*a)[30]);
This is the *****only***** context in which array and pointer
declaration syntax is sort of interchangeable, and it's the reason
the magnitude of the first dimension doesn't matter - all four
declare "a" to be a pointer to an array of 30 ints.
No - they are still different with all consequences. For example array
declarators (the first three) are not modifiable lvalues, while the last
declarator is.
So it is impossible to use ,,a = sth;''
-- best regards
Cezary Noweta
.
- Follow-Ups:
- Re: Passing address of multidimentional array
- From: Doug Harrison [MVP]
- Re: Passing address of multidimentional array
- References:
- Passing address of multidimentional array
- From: goodTweetieBird
- Re: Passing address of multidimentional array
- From: Doug Harrison [MVP]
- Passing address of multidimentional array
- Prev by Date: Re: VC8 Compiler bizarreness
- Next by Date: Re: Passing address of multidimentional array
- Previous by thread: Re: Passing address of multidimentional array
- Next by thread: Re: Passing address of multidimentional array
- Index(es):
Relevant Pages
|