why it doesn't work?
- From: "Chief" <blonskey@xxxxxxxxx>
- Date: 31 Jan 2007 04:51:25 -0800
hey you guys(and girls)....
if B is a 1D array (for instance int B[3]) and C is an int* pointer
(int*) then i can write C=B and everything will be cool.
but if B is a 2D array (for instance int B[3][5]) and C ia an int**
pointer (int**) then the same line , C=B, generates a warning
(incompatible types) and further use of C as a 2D array gets a runtime
error.....
y is this happening??? especially when we know that *(*(B+1)+2)
is legal !!
10x a lot,
the confused C-lover....
.
- Follow-Ups:
- Re: why it doesn't work?
- From: CBFalconer
- Re: why it doesn't work?
- From: Chris Dollin
- Re: why it doesn't work?
- Prev by Date: Re: How to improve this sort?
- Next by Date: Re: Read hex string to a buf
- Previous by thread: How to reduce Zero Initialised region.
- Next by thread: Re: why it doesn't work?
- Index(es):
Relevant Pages
|