Mail Archives: djgpp/1998/01/17/00:48:00
Peter Palotas wrote:
>
> At 17.48 1998-01-14 -0800, you wrote:
> >> Okay, if you say so, you should know best! Guess I'll just have to settle
> >> with the ugly looking pointer then! (Why not atleast make it capital
> letters!?)
> >
> >Why not just use "0x%08lX"?
>
> That wouldn't be compatible with other compilers!
Well, here's an easy one:
#ifdef DJGPP
printf( "0x%p", p );
#else
printf( "%p", p );
#endif
More advanced examples are left as an exercise for the reader.
--
---------------------------------------------------------------------
| John M. Aldrich | "Be wary of strong drink. It can |
| aka Fighteer I | make you shoot at tax collectors-- |
| mailto:fighteer AT cs DOT com | and miss." |
| http://www.cs.com/fighteer | - Lazarus Long |
---------------------------------------------------------------------
- Raw text -