stdio performance in tango, stdlib, and perl
Roberto Mariottini
rmariottini at mail.com
Fri Mar 23 02:29:31 PDT 2007
Andrei Alexandrescu (See Website For Email) wrote:
> Roberto Mariottini wrote:
>> The portable way to write a newline in C++ is to use the 'endl'
>> modifier.
>> Your program is not portable, on Windows it will generate Unix text
>> files.
>
> Wrong. Newline translation will be correct on both systems.
It depends on how you open the file: 'endl' works even with files open
in binary mode (the default on most platforms, the default on the
average programmer).
Or else, say that 'endl' is yet another design error in C++.
Ciao
More information about the Digitalmars-d
mailing list