The second edition of this book contains a chapter about streams.
You will find the printf vs cout here.
Greetingz
Anthony
"Ying Yang" <YingYang@hotma il.com> schreef in bericht
news:3f717ef6_1 @news.iprimus.c om.au...[color=blue]
> Hi,
>
> Whats the difference between printf and cout? They both seem to do the[/color]
same[color=blue]
> thing.
>
>
> Regards
> dsfg
>
>[/color]
On Wed, 24 Sep 2003 20:54:46 +0930, "Ying Yang" <YingYang@hotma il.com>
wrote:
[color=blue]
>Hi,
>
>Whats the difference between printf and cout? They both seem to do the same
>thing.[/color]
In other words, they have completely different syntax. C++ has both, C
only has printf.
In high level terms, the main differences are type safety (cstdio
doesn't have it), performance (most iostreams implementations are
slower than the cstdio ones) and extensibility (iostreams allows
custom output targets and seamless output of user defined types).
Comment