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

Similar Threads

Pointer casts for OOP 2
function casts 27
Casts on lvalues 74
Union and pointer casts? 13
Better casts? 10
casts and pointers 0
cast musings 19
Casts for srand? (FAQ 13.17) 2

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top