by Sherman Pendley <spamtrap@[EMAIL PROTECTED]
>
May 8, 2008 at 10:58 AM
Erwin Moller <hi.steven.tu@[EMAIL PROTECTED]
> writes:
> Why is a binary file executable? Is any binary file executable? Is
> only binary file executable? Are all executable files binary?
Some systems distinguish between text and non-text (i.e. binary) files.
Not all do. The ones that do, will perform various text translations
when writing to a text file.
> What is
> the connection between the attribute of binary and that of executable?
There is none. What makes a file "binary" is not its contents, but whether
or
not you included ios::binary in the optional flags argument to
fstream::open.
On systems that care, you can open a file that has text in it as binary to
avoid the translations that would happen if you opened it as text. You can
also do the opposite, but that's rarely useful; text-mode translations
generally FUBAR any binary data.
sherm--
--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net