|
![](/i/fill.gif) |
Invisible <voi### [at] dev null> wrote:
> I presume this doesn't work on a protected-mode OS?
Well, the program has some memory allocated for itself, so if the pointer
happens to point to such memory, it will print gibberish. If it points to
unallocated memory you get a segmentation fault.
The C++ version of printing to stdout (or to a stream) is much safer
from this point of view. (While you *can* make it behave the same way,
it's much harder to do so accidentally.)
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |