This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: printf VS cout


Detlev Casanova <detlev.casanova@gmail.com> writes:

> They say that with C++, the printf() function must not be used at all, that 
> cout is to be used. they say that printf() is only for C programming.
> 
> On a personnal project, I use printf() a lot even if it is in C++.
> 
> So, is it true ? Do I have to use cout instead of printf in C++ code ?

This question is more appropriate for gcc-help than for libstdc++,
which is a developer's list.  Please take any followups to gcc-help.
Thanks.

printf works fine in C++ code.  Whether to use it or not is entirely a
matter of programming style.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]