Two questions of pointers
From: Busin (businm_at_fidrep.com)
Date: 06/30/04
- Next message: Mike Wahler: "Re: no match for complain"
- Previous message: SaltPeter: "Re: ofstream and rdstate()"
- Next in thread: Thomas Matthews: "Re: Two questions of pointers"
- Reply: Thomas Matthews: "Re: Two questions of pointers"
- Reply: Mike Wahler: "Re: Two questions of pointers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Jun 2004 15:18:37 GMT
1.
Given 2 address/pointers,
int* p1;
p1 = ...;
int* p2;
p2 = ...;
Is the difference, p2-p1, in bytes?
2.
int* p1;
p1 = ...;
int* p2;
p2 = p1 + 1;
Will p1 + 1 increment by 1 byte or by 4 bytes? In other words, what's the
difference between p2 and p2?
Thanks!
- Next message: Mike Wahler: "Re: no match for complain"
- Previous message: SaltPeter: "Re: ofstream and rdstate()"
- Next in thread: Thomas Matthews: "Re: Two questions of pointers"
- Reply: Thomas Matthews: "Re: Two questions of pointers"
- Reply: Mike Wahler: "Re: Two questions of pointers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]