Discussion: sizeof(ptr) = ?
Afficher un message
Vieux 22/10/2007, 10h29   #8
Martien Verbruggen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sizeof(ptr) = ?

On Mon, 22 Oct 2007 14:04:59 +0530,
santosh <santosh.k83@gmail.com> wrote:
> William Xu wrote:
>
>> I test it with char, short, int, long, float, double and struct
>> pointers, all return 4 bytes. Does the standard say anything about
>> sizeof a pointer? (I didn't find it in the standard...)

>
> No. It says that a pointer of type void * must be capable of holding any
> pointer value, but nothing specific is said about the sizes of
> pointers.


Except, possibly, pointers to function.

Martien
--
|
Martien Verbruggen | You can't have everything, where would you
| put it?
|
  Réponse avec citation
 
Page generated in 0,05325 seconds with 9 queries