Casts

J

Johan Bengtsson

Richard said:
Johan Bengtsson said:


The Standard allows for the possibility that not all pointers have the
same size or representation. Rather than provide a different format
specifier for every single pointer type - an impossible task - C
requires that the pointer provided to match a %p conversion specifier
must be a pointer to void.
Ahh, ok, I don't think I *ever* have seen such a cast in a printf
function call before however.
 
R

Richard Heathfield

Johan Bengtsson said:
Richard Heathfield wrote:

Ahh, ok, I don't think I *ever* have seen such a cast in a printf
function call before however.

There are a lot of things you don't commonly see in C code, that you
should see. And there are a lot of things that you shouldn't see, that
you do see. The comp.lang.c newsgroup is not responsible for the C code
that you see - you are. If you see broken stuff that matters, fix it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,470
Messages
2,571,809
Members
48,797
Latest member
PeterSimpson
Top